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
Constructors Constructor Description LuceneIndexFieldTypeFactoryImpl(EventContext eventContext, BackendMapperContext backendMapperContext, LuceneAnalysisDefinitionRegistry analysisDefinitionRegistry, IndexFieldTypeDefaultsProvider typeDefaultsProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <F> StandardIndexFieldTypeOptionsStep<?,F>as(Class<F> valueType)Define a field type whose values are represented as a given type in Hibernate Search.ScaledNumberIndexFieldTypeOptionsStep<?,BigDecimal>asBigDecimal()Define a field type whose values are represented as aBigDecimalin Hibernate Search.ScaledNumberIndexFieldTypeOptionsStep<?,BigInteger>asBigInteger()Define a field type whose values are represented as aBigIntegerin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Boolean>asBoolean()Define a field type whose values are represented as aBooleanin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Byte>asByte()Define a field type whose values are represented as aBytein Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Double>asDouble()Define a field type whose values are represented as aDoublein Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Float>asFloat()Define a field type whose values are represented as aFloatin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,GeoPoint>asGeoPoint()Define a field type whose values are represented as aGeoPointin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Instant>asInstant()Define a field type whose values are represented as anInstantin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Integer>asInteger()Define a field type whose values are represented as anIntegerin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,LocalDate>asLocalDate()Define a field type whose values are represented as aLocalDatein Hibernate Search.StandardIndexFieldTypeOptionsStep<?,LocalDateTime>asLocalDateTime()Define a field type whose values are represented as aLocalDateTimein Hibernate Search.StandardIndexFieldTypeOptionsStep<?,LocalTime>asLocalTime()Define a field type whose values are represented as aLocalTimein Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Long>asLong()Define a field type whose values are represented as aLongin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,MonthDay>asMonthDay()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.StandardIndexFieldTypeOptionsStep<?,OffsetDateTime>asOffsetDateTime()Define a field type whose values are represented as anOffsetDateTimein Hibernate Search.StandardIndexFieldTypeOptionsStep<?,OffsetTime>asOffsetTime()Define a field type whose values are represented as anOffsetTimein Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Short>asShort()Define a field type whose values are represented as aShortin Hibernate Search.StringIndexFieldTypeOptionsStep<?>asString()Define a field type whose values are represented as aStringin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Year>asYear()Define a field type whose values are represented as aYearin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,YearMonth>asYearMonth()Define a field type whose values are represented as aYearMonthin Hibernate Search.StandardIndexFieldTypeOptionsStep<?,ZonedDateTime>asZonedDateTime()Define a field type whose values are represented as aZonedDateTimein Hibernate Search.LuceneAnalysisDefinitionRegistrygetAnalysisDefinitionRegistry()EventContextgetEventContext()BackendMappingHintshints()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.backend.types.dsl.IndexFieldTypeFactory
extension
-
Methods inherited from interface org.hibernate.search.backend.lucene.types.dsl.LuceneIndexFieldTypeFactory
asNative
-
-
-
-
Constructor Detail
-
LuceneIndexFieldTypeFactoryImpl
public LuceneIndexFieldTypeFactoryImpl(EventContext eventContext, BackendMapperContext backendMapperContext, LuceneAnalysisDefinitionRegistry analysisDefinitionRegistry, IndexFieldTypeDefaultsProvider typeDefaultsProvider)
-
-
Method Detail
-
as
public <F> StandardIndexFieldTypeOptionsStep<?,F> as(Class<F> valueType)
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.
-
asString
public StringIndexFieldTypeOptionsStep<?> 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
public StandardIndexFieldTypeOptionsStep<?,Integer> 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
public StandardIndexFieldTypeOptionsStep<?,Long> 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
public StandardIndexFieldTypeOptionsStep<?,Boolean> 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
public StandardIndexFieldTypeOptionsStep<?,Byte> 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
public StandardIndexFieldTypeOptionsStep<?,Short> 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
public StandardIndexFieldTypeOptionsStep<?,Float> 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
public StandardIndexFieldTypeOptionsStep<?,Double> 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
public StandardIndexFieldTypeOptionsStep<?,LocalDate> 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
public StandardIndexFieldTypeOptionsStep<?,LocalDateTime> 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
public StandardIndexFieldTypeOptionsStep<?,LocalTime> 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
public StandardIndexFieldTypeOptionsStep<?,Instant> 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
public StandardIndexFieldTypeOptionsStep<?,ZonedDateTime> 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
public StandardIndexFieldTypeOptionsStep<?,Year> 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
public StandardIndexFieldTypeOptionsStep<?,YearMonth> 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
public StandardIndexFieldTypeOptionsStep<?,MonthDay> 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
public StandardIndexFieldTypeOptionsStep<?,OffsetDateTime> 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
public StandardIndexFieldTypeOptionsStep<?,OffsetTime> 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
public StandardIndexFieldTypeOptionsStep<?,GeoPoint> 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
public ScaledNumberIndexFieldTypeOptionsStep<?,BigDecimal> 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
public ScaledNumberIndexFieldTypeOptionsStep<?,BigInteger> 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.
-
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
public EventContext getEventContext()
- Specified by:
getEventContextin interfaceLuceneIndexFieldTypeBuildContext
-
getAnalysisDefinitionRegistry
public LuceneAnalysisDefinitionRegistry getAnalysisDefinitionRegistry()
- Specified by:
getAnalysisDefinitionRegistryin interfaceLuceneIndexFieldTypeBuildContext
-
hints
public BackendMappingHints hints()
- Specified by:
hintsin interfaceLuceneIndexFieldTypeBuildContext
-
-