Class FieldMappingBuilder
java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.contentmodelsync.FieldMappingBuilder
A component which accepts the set of attributes that compose an Alfresco property definition and outputs the corresponding Elasticsearch field mapping. It is possible to provide a custom mappers by implementing
CustomFieldMapper and declaring them in the Spring Context. All mapper beans will be injected at startup time - no additional configuration is needed.-
Constructor Summary
ConstructorsConstructorDescriptionFieldMappingBuilder(Collection<PredefinedFieldMapper> predefinedFieldMappers, Collection<CustomFieldMapper> customFieldMappers) -
Method Summary
Modifier and TypeMethodDescriptionbuildFieldsMappings(String indexName, Collection<PropertyDefinition> contentModelProperties) Builds the Elasticsearch field mappings according with the input data.
-
Constructor Details
-
FieldMappingBuilder
public FieldMappingBuilder(Collection<PredefinedFieldMapper> predefinedFieldMappers, Collection<CustomFieldMapper> customFieldMappers)
-
-
Method Details
-
buildFieldsMappings
public Pair<org.opensearch.client.opensearch.generic.Request,Integer> buildFieldsMappings(String indexName, Collection<PropertyDefinition> contentModelProperties) Builds the Elasticsearch field mappings according with the input data.- Parameters:
indexName- the target Elasticsearch index name.contentModelProperties- the Alfresco property (e.g. {...}content)- Returns:
- a Pair object containing as first value the Elasticsearch field mappings corresponding to the input property definition and as second value containing the successfully mapped property count.
-