Class LuceneIndexFieldTypeFactoryImpl
java.lang.Object
org.hibernate.search.backend.lucene.types.dsl.impl.LuceneIndexFieldTypeFactoryImpl
- All Implemented Interfaces:
LuceneIndexFieldTypeBuildContext,LuceneIndexFieldTypeFactory,IndexFieldTypeFactory
public class LuceneIndexFieldTypeFactoryImpl
extends Object
implements LuceneIndexFieldTypeFactory, LuceneIndexFieldTypeBuildContext
-
Constructor Summary
ConstructorsConstructorDescriptionLuceneIndexFieldTypeFactoryImpl(EventContext eventContext, BackendMapperContext backendMapperContext, LuceneAnalysisDefinitionRegistry analysisDefinitionRegistry, IndexFieldTypeDefaultsProvider typeDefaultsProvider) -
Method Summary
Modifier and TypeMethodDescription<F> StandardIndexFieldTypeOptionsStep<?,F> Define a field type whose values are represented as a given type in Hibernate Search.Define a field type whose values are represented as aBigDecimalin Hibernate Search.Define a field type whose values are represented as aBigIntegerin Hibernate Search.Define a field type whose values are represented as aBooleanin Hibernate Search.asByte()Define a field type whose values are represented as aBytein Hibernate Search.VectorFieldTypeOptionsStep<?,byte[]> Define a field type intended for use in vector search and whose values are represented as abyte[]in Hibernate Search.asDouble()Define a field type whose values are represented as aDoublein Hibernate Search.asFloat()Define a field type whose values are represented as aFloatin Hibernate Search.VectorFieldTypeOptionsStep<?,float[]> Define a field type intended for use in vector search and whose values are represented as afloat[]in Hibernate Search.Define a field type whose values are represented as aGeoPointin Hibernate Search.Define a field type whose values are represented as anInstantin Hibernate Search.Define a field type whose values are represented as anIntegerin Hibernate Search.Define a field type whose values are represented as aLocalDatein Hibernate Search.Define a field type whose values are represented as aLocalDateTimein Hibernate Search.Define a field type whose values are represented as aLocalTimein Hibernate Search.asLong()Define a field type whose values are represented as aLongin Hibernate Search.Define a field type whose values are represented as aMonthDayin Hibernate Search.<F> IndexFieldTypeOptionsStep<?,F> asNative(Class<F> indexFieldType, LuceneFieldContributor<F> fieldContributor, LuceneFieldValueExtractor<F> fieldValueExtractor) Define a native field type.Define a field type whose values are represented as anOffsetDateTimein Hibernate Search.Define a field type whose values are represented as anOffsetTimein Hibernate Search.asShort()Define a field type whose values are represented as aShortin Hibernate Search.asString()Define a field type whose values are represented as aStringin Hibernate Search.<F> VectorFieldTypeOptionsStep<?,F> Define a vector field type whose values are represented as a given type in Hibernate Search.asYear()Define a field type whose values are represented as aYearin Hibernate Search.Define a field type whose values are represented as aYearMonthin Hibernate Search.Define a field type whose values are represented as aZonedDateTimein Hibernate Search.hints()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.backend.types.dsl.IndexFieldTypeFactory
extensionMethods inherited from interface org.hibernate.search.backend.lucene.types.dsl.LuceneIndexFieldTypeFactory
asNative
-
Constructor Details
-
LuceneIndexFieldTypeFactoryImpl
public LuceneIndexFieldTypeFactoryImpl(EventContext eventContext, BackendMapperContext backendMapperContext, LuceneAnalysisDefinitionRegistry analysisDefinitionRegistry, IndexFieldTypeDefaultsProvider typeDefaultsProvider)
-
-
Method Details
-
as
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as a given type in Hibernate Search.Note this method will return a "generic" DSL step that does not offer any type-specific options. When possible, prefer the other methods such as
IndexFieldTypeFactory.asString()orIndexFieldTypeFactory.asInteger().- Specified by:
asin interfaceIndexFieldTypeFactory- Type Parameters:
F- The type of values for this field type.- Parameters:
valueType- The type of values for this field type.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asVector
Description copied from interface:IndexFieldTypeFactoryDefine a vector field type whose values are represented as a given type in Hibernate Search.When possible, prefer the other methods such as
IndexFieldTypeFactory.asByteVector()orIndexFieldTypeFactory.asFloatVector()to avoid unnecessary type checks.- Specified by:
asVectorin interfaceIndexFieldTypeFactory- Type Parameters:
F- The type of values for this field type.- Parameters:
valueType- The type of values for this field type. Should be an array type likebyte[]orfloat[].- Returns:
- A DSL step where the index vector field type can be defined in more details.
-
asString
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aStringin Hibernate Search.- Specified by:
asStringin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asInteger
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as anIntegerin Hibernate Search.- Specified by:
asIntegerin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asLong
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aLongin Hibernate Search.- Specified by:
asLongin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asBoolean
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aBooleanin Hibernate Search.- Specified by:
asBooleanin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asByte
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aBytein Hibernate Search.- Specified by:
asBytein interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asShort
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aShortin Hibernate Search.- Specified by:
asShortin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asFloat
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aFloatin Hibernate Search.- Specified by:
asFloatin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asDouble
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aDoublein Hibernate Search.- Specified by:
asDoublein interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asLocalDate
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aLocalDatein Hibernate Search.- Specified by:
asLocalDatein interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asLocalDateTime
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aLocalDateTimein Hibernate Search.- Specified by:
asLocalDateTimein interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asLocalTime
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aLocalTimein Hibernate Search.- Specified by:
asLocalTimein interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asInstant
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as anInstantin Hibernate Search.- Specified by:
asInstantin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asZonedDateTime
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aZonedDateTimein Hibernate Search.- Specified by:
asZonedDateTimein interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asYear
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aYearin Hibernate Search.- Specified by:
asYearin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asYearMonth
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aYearMonthin Hibernate Search.- Specified by:
asYearMonthin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asMonthDay
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aMonthDayin Hibernate Search.- Specified by:
asMonthDayin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asOffsetDateTime
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as anOffsetDateTimein Hibernate Search.- Specified by:
asOffsetDateTimein interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asOffsetTime
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as anOffsetTimein Hibernate Search.- Specified by:
asOffsetTimein interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asGeoPoint
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aGeoPointin Hibernate Search.- Specified by:
asGeoPointin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asBigDecimal
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aBigDecimalin Hibernate Search.- Specified by:
asBigDecimalin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asBigInteger
Description copied from interface:IndexFieldTypeFactoryDefine a field type whose values are represented as aBigIntegerin Hibernate Search.- Specified by:
asBigIntegerin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asByteVector
Description copied from interface:IndexFieldTypeFactoryDefine a field type intended for use in vector search and whose values are represented as abyte[]in Hibernate Search.- Specified by:
asByteVectorin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asFloatVector
Description copied from interface:IndexFieldTypeFactoryDefine a field type intended for use in vector search and whose values are represented as afloat[]in Hibernate Search.- Specified by:
asFloatVectorin interfaceIndexFieldTypeFactory- Returns:
- A DSL step where the index field type can be defined in more details.
-
asNative
public <F> IndexFieldTypeOptionsStep<?,F> asNative(Class<F> indexFieldType, LuceneFieldContributor<F> fieldContributor, LuceneFieldValueExtractor<F> fieldValueExtractor) Description copied from interface:LuceneIndexFieldTypeFactoryDefine a native field type.A native field type has the following characteristics:
- Hibernate Search doesn't know its exact type, so it cannot be configured precisely, except through the parameters passed to this method
- When indexing, fields values will be passed to the
field contributor. This contributor will translate the value intoIndexableFieldinstances which will be added to the document. - The predicate/sort DSLs cannot be used on fields of this type.
It is recommended to create the predicate/sort/projections targeting these fields from native Lucene objects
using
LuceneSearchPredicateFactory.fromLuceneQuery(Query)orLuceneSearchSortFactory.fromLuceneSort(Sort) - The projection DSL can only be used on fields of this type of
fieldValueExtractoris non-null. When projecting, the value extractor will be passed theIndexableFieldand will return the corresponding projected value of typeF.
- Specified by:
asNativein interfaceLuceneIndexFieldTypeFactory- Type Parameters:
F- The type of the value.- Parameters:
indexFieldType- The type of the value.fieldContributor- The field contributor.fieldValueExtractor- The field value extractor used when projecting on this field.- Returns:
- A DSL step where the index field type can be defined in more details.
-
getEventContext
- Specified by:
getEventContextin interfaceLuceneIndexFieldTypeBuildContext
-
getAnalysisDefinitionRegistry
- Specified by:
getAnalysisDefinitionRegistryin interfaceLuceneIndexFieldTypeBuildContext
-
hints
- Specified by:
hintsin interfaceLuceneIndexFieldTypeBuildContext
-