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
Constructors Constructor Description ElasticsearchIndexRootBuilder(ElasticsearchIndexFieldTypeFactoryProvider typeFactoryProvider, EventContext indexEventContext, BackendMapperContext backendMapperContext, IndexNames indexNames, String mappedTypeName, ElasticsearchAnalysisDefinitionRegistry analysisDefinitionRegistry, IndexSettings customIndexSettings, RootTypeMapping customIndexMapping, DynamicMapping dynamicMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddImplicitFieldContributor(ImplicitFieldContributor implicitFieldContributor)voidaddSchemaRootContributor(IndexSchemaRootContributor schemaRootContributor)ElasticsearchIndexModelbuild()ElasticsearchIndexFieldTypeFactorycreateTypeFactory(IndexFieldTypeDefaultsProvider defaultsProvider)EventContexteventContext()voidexplicitRouting()Inform 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.<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, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.backend.document.model.dsl.spi.IndexCompositeNodeBuilder
addField, addFieldTemplate, addNamedPredicate, addObjectField, addObjectFieldTemplate
-
-
-
-
Constructor Detail
-
ElasticsearchIndexRootBuilder
public ElasticsearchIndexRootBuilder(ElasticsearchIndexFieldTypeFactoryProvider typeFactoryProvider, EventContext indexEventContext, BackendMapperContext backendMapperContext, IndexNames indexNames, String mappedTypeName, ElasticsearchAnalysisDefinitionRegistry analysisDefinitionRegistry, IndexSettings customIndexSettings, RootTypeMapping customIndexMapping, DynamicMapping dynamicMapping)
-
-
Method Detail
-
eventContext
public EventContext 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
public <I> void idDslConverter(Class<I> valueType, ToDocumentValueConverter<I,String> converter)
Description copied from interface:IndexRootBuilderDefines how identifier values passed to the search DSL should be converted to document identifiers.When not set, users are expected to pass document identifiers directly.
- 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).
-
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
public void addSchemaRootContributor(IndexSchemaRootContributor schemaRootContributor)
-
addImplicitFieldContributor
public void addImplicitFieldContributor(ImplicitFieldContributor implicitFieldContributor)
-
build
public ElasticsearchIndexModel build()
-
-