Interface IndexFieldTypeFactory
public interface IndexFieldTypeFactory
A factory for types of index fields.
-
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.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.default <T> Textension(IndexFieldTypeFactoryExtension<T> extension) Extend the current factory with the given extension, resulting in an extended factory offering more field types.
-
Method Details
-
as
Define 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
asString()orasInteger().- 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.
- Throws:
org.hibernate.search.util.common.SearchException- If the giveninputTypeis not supported.
-
asVector
Define a vector field type whose values are represented as a given type in Hibernate Search.When possible, prefer the other methods such as
asByteVector()orasFloatVector()to avoid unnecessary type checks.- 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
StringIndexFieldTypeOptionsStep<?> asString()Define a field type whose values are represented as aStringin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asInteger
StandardIndexFieldTypeOptionsStep<?,Integer> asInteger()Define a field type whose values are represented as anIntegerin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asLong
StandardIndexFieldTypeOptionsStep<?,Long> asLong()Define a field type whose values are represented as aLongin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asBoolean
StandardIndexFieldTypeOptionsStep<?,Boolean> asBoolean()Define a field type whose values are represented as aBooleanin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asByte
StandardIndexFieldTypeOptionsStep<?,Byte> asByte()Define a field type whose values are represented as aBytein Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asShort
StandardIndexFieldTypeOptionsStep<?,Short> asShort()Define a field type whose values are represented as aShortin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asFloat
StandardIndexFieldTypeOptionsStep<?,Float> asFloat()Define a field type whose values are represented as aFloatin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asDouble
StandardIndexFieldTypeOptionsStep<?,Double> asDouble()Define a field type whose values are represented as aDoublein Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asLocalDate
StandardIndexFieldTypeOptionsStep<?,LocalDate> asLocalDate()Define a field type whose values are represented as aLocalDatein Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asLocalDateTime
StandardIndexFieldTypeOptionsStep<?,LocalDateTime> asLocalDateTime()Define a field type whose values are represented as aLocalDateTimein Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asLocalTime
StandardIndexFieldTypeOptionsStep<?,LocalTime> asLocalTime()Define a field type whose values are represented as aLocalTimein Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asInstant
StandardIndexFieldTypeOptionsStep<?,Instant> asInstant()Define a field type whose values are represented as anInstantin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asZonedDateTime
StandardIndexFieldTypeOptionsStep<?,ZonedDateTime> asZonedDateTime()Define a field type whose values are represented as aZonedDateTimein Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asYear
StandardIndexFieldTypeOptionsStep<?,Year> asYear()Define a field type whose values are represented as aYearin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asYearMonth
StandardIndexFieldTypeOptionsStep<?,YearMonth> asYearMonth()Define a field type whose values are represented as aYearMonthin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asMonthDay
StandardIndexFieldTypeOptionsStep<?,MonthDay> asMonthDay()Define a field type whose values are represented as aMonthDayin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asOffsetDateTime
StandardIndexFieldTypeOptionsStep<?,OffsetDateTime> asOffsetDateTime()Define a field type whose values are represented as anOffsetDateTimein Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asOffsetTime
StandardIndexFieldTypeOptionsStep<?,OffsetTime> asOffsetTime()Define a field type whose values are represented as anOffsetTimein Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asGeoPoint
StandardIndexFieldTypeOptionsStep<?,GeoPoint> asGeoPoint()Define a field type whose values are represented as aGeoPointin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asBigDecimal
ScaledNumberIndexFieldTypeOptionsStep<?,BigDecimal> asBigDecimal()Define a field type whose values are represented as aBigDecimalin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asBigInteger
ScaledNumberIndexFieldTypeOptionsStep<?,BigInteger> asBigInteger()Define a field type whose values are represented as aBigIntegerin Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asByteVector
Define a field type intended for use in vector search and whose values are represented as abyte[]in Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
asFloatVector
Define a field type intended for use in vector search and whose values are represented as afloat[]in Hibernate Search.- Returns:
- A DSL step where the index field type can be defined in more details.
-
extension
Extend the current factory with the given extension, resulting in an extended factory offering more field types.- Type Parameters:
T- The type of factory provided by the extension.- Parameters:
extension- The extension to apply.- Returns:
- The extended factory.
- Throws:
org.hibernate.search.util.common.SearchException- If the extension cannot be applied (wrong underlying technology, ...).
-