Interface IndexFieldTypeFactory
- All Known Subinterfaces:
ElasticsearchIndexFieldTypeFactory
,LuceneIndexFieldTypeFactory
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 aBigDecimal
in Hibernate Search.Define a field type whose values are represented as aBigInteger
in Hibernate Search.Define a field type whose values are represented as aBoolean
in Hibernate Search.asByte()
Define a field type whose values are represented as aByte
in 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 aDouble
in Hibernate Search.asFloat()
Define a field type whose values are represented as aFloat
in 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 aGeoPoint
in Hibernate Search.Define a field type whose values are represented as anInstant
in Hibernate Search.Define a field type whose values are represented as anInteger
in Hibernate Search.Define a field type whose values are represented as aLocalDate
in Hibernate Search.Define a field type whose values are represented as aLocalDateTime
in Hibernate Search.Define a field type whose values are represented as aLocalTime
in Hibernate Search.asLong()
Define a field type whose values are represented as aLong
in Hibernate Search.Define a field type whose values are represented as aMonthDay
in Hibernate Search.Define a field type whose values are represented as anOffsetDateTime
in Hibernate Search.Define a field type whose values are represented as anOffsetTime
in Hibernate Search.asShort()
Define a field type whose values are represented as aShort
in Hibernate Search.asString()
Define a field type whose values are represented as aString
in 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 aYear
in Hibernate Search.Define a field type whose values are represented as aYearMonth
in Hibernate Search.Define a field type whose values are represented as aZonedDateTime
in Hibernate Search.default <T> T
extension
(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:
SearchException
- If the giveninputType
is 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 aString
in 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 anInteger
in 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 aLong
in 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 aBoolean
in 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 aByte
in 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 aShort
in 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 aFloat
in 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 aDouble
in 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 aLocalDate
in 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 aLocalDateTime
in 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 aLocalTime
in 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 anInstant
in 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 aZonedDateTime
in 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 aYear
in 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 aYearMonth
in 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 aMonthDay
in 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 anOffsetDateTime
in 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 anOffsetTime
in 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 aGeoPoint
in 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 aBigDecimal
in 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 aBigInteger
in 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:
SearchException
- If the extension cannot be applied (wrong underlying technology, ...).
-