Class ElasticsearchIndexRootBuilder
java.lang.Object
org.hibernate.search.backend.elasticsearch.document.model.dsl.impl.AbstractElasticsearchIndexCompositeNodeBuilder
org.hibernate.search.backend.elasticsearch.document.model.dsl.impl.ElasticsearchIndexRootBuilder
- All Implemented Interfaces:
IndexCompositeNodeBuilder,IndexRootBuilder,IndexSchemaBuildContext
public class ElasticsearchIndexRootBuilder
extends AbstractElasticsearchIndexCompositeNodeBuilder
implements IndexRootBuilder
-
Field Summary
Fields inherited from class org.hibernate.search.backend.elasticsearch.document.model.dsl.impl.AbstractElasticsearchIndexCompositeNodeBuilder
typeBuilder -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchIndexRootBuilder(ElasticsearchIndexFieldTypeFactoryProvider typeFactoryProvider, EventContext indexEventContext, BackendMapperContext backendMapperContext, String hibernateSearchIndexName, String mappedTypeName, ElasticsearchAnalysisDefinitionRegistry analysisDefinitionRegistry, IndexSettings customIndexSettings, RootTypeMapping customIndexMapping, DynamicMapping dynamicMapping) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddImplicitFieldContributor(ImplicitFieldContributor implicitFieldContributor) voidaddSchemaRootContributor(IndexSchemaRootContributor schemaRootContributor) build()createTypeFactory(IndexFieldTypeDefaultsProvider defaultsProvider) voidInform the model collector that documents will always be provided along with an explicit routing key, to be used to route the document to a specific shard.<I> voididDslConverter(Class<I> valueType, ToDocumentValueConverter<I, String> converter) Defines how identifier values passed to the search DSL should be converted to document identifiers when usingValueModel.MAPPING.voididParser(ToDocumentValueConverter<String, String> converter) Defines how identifier values passed to the search DSL should be converted to document identifiers when usingValueModel.STRING.<I> voididProjectionConverter(Class<I> valueType, FromDocumentValueConverter<String, I> converter) Define how values returned when projecting on identifiers should be converted before being returned to the user.Methods inherited from class org.hibernate.search.backend.elasticsearch.document.model.dsl.impl.AbstractElasticsearchIndexCompositeNodeBuilder
addField, addFieldTemplate, addNamedPredicate, addObjectField, addObjectFieldTemplate, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.backend.document.model.dsl.spi.IndexCompositeNodeBuilder
addField, addFieldTemplate, addNamedPredicate, addObjectField, addObjectFieldTemplate
-
Constructor Details
-
ElasticsearchIndexRootBuilder
public ElasticsearchIndexRootBuilder(ElasticsearchIndexFieldTypeFactoryProvider typeFactoryProvider, EventContext indexEventContext, BackendMapperContext backendMapperContext, String hibernateSearchIndexName, String mappedTypeName, ElasticsearchAnalysisDefinitionRegistry analysisDefinitionRegistry, IndexSettings customIndexSettings, RootTypeMapping customIndexMapping, DynamicMapping dynamicMapping)
-
-
Method Details
-
eventContext
- Specified by:
eventContextin interfaceIndexSchemaBuildContext- Returns:
- A list of failure context elements to be passed to the constructor of any
SearchExceptionoccurring in this context.
-
createTypeFactory
public ElasticsearchIndexFieldTypeFactory createTypeFactory(IndexFieldTypeDefaultsProvider defaultsProvider) - Specified by:
createTypeFactoryin interfaceIndexRootBuilder
-
explicitRouting
public void explicitRouting()Description copied from interface:IndexRootBuilderInform the model collector that documents will always be provided along with an explicit routing key, to be used to route the document to a specific shard.- Specified by:
explicitRoutingin interfaceIndexRootBuilder
-
idDslConverter
Description copied from interface:IndexRootBuilderDefines how identifier values passed to the search DSL should be converted to document identifiers when usingValueModel.MAPPING.- Specified by:
idDslConverterin interfaceIndexRootBuilder- Type Parameters:
I- The type of identifier values that can be passed to the DSL.- Parameters:
valueType- The type of values that can be passed to the DSL.converter- A converter from the given value type to the document identifier (a string).
-
idParser
Description copied from interface:IndexRootBuilderDefines how identifier values passed to the search DSL should be converted to document identifiers when usingValueModel.STRING.- Specified by:
idParserin interfaceIndexRootBuilder- Parameters:
converter- A converter from the string value type to the document identifier (a string).
-
idProjectionConverter
public <I> void idProjectionConverter(Class<I> valueType, FromDocumentValueConverter<String, I> converter) Description copied from interface:IndexRootBuilderDefine how values returned when projecting on identifiers should be converted before being returned to the user.When not set, users will be returned the document identifier directly.
- Specified by:
idProjectionConverterin interfaceIndexRootBuilder- Type Parameters:
I- The type of values that will be returned when projecting on identifiers.- Parameters:
valueType- The type of values that will be returned when projecting on fields of this type.converter- A converter from the document identifier (a string) to the given value type.
-
addSchemaRootContributor
-
addImplicitFieldContributor
-
build
-