Interface IndexFieldTypeFactory
-
- All Known Subinterfaces:
ElasticsearchIndexFieldTypeFactory
,LuceneIndexFieldTypeFactory
public interface IndexFieldTypeFactory
A factory for types of index fields.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default 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 aBigDecimal
in Hibernate Search.ScaledNumberIndexFieldTypeOptionsStep<?,BigInteger>
asBigInteger()
Define a field type whose values are represented as aBigInteger
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Boolean>
asBoolean()
Define a field type whose values are represented as aBoolean
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Byte>
asByte()
Define a field type whose values are represented as aByte
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Double>
asDouble()
Define a field type whose values are represented as aDouble
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Float>
asFloat()
Define a field type whose values are represented as aFloat
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,GeoPoint>
asGeoPoint()
Define a field type whose values are represented as aGeoPoint
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Instant>
asInstant()
Define a field type whose values are represented as anInstant
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Integer>
asInteger()
Define a field type whose values are represented as anInteger
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,LocalDate>
asLocalDate()
Define a field type whose values are represented as aLocalDate
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,LocalDateTime>
asLocalDateTime()
Define a field type whose values are represented as aLocalDateTime
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,LocalTime>
asLocalTime()
Define a field type whose values are represented as aLocalTime
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Long>
asLong()
Define a field type whose values are represented as aLong
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,MonthDay>
asMonthDay()
Define a field type whose values are represented as aMonthDay
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,OffsetDateTime>
asOffsetDateTime()
Define a field type whose values are represented as anOffsetDateTime
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,OffsetTime>
asOffsetTime()
Define a field type whose values are represented as anOffsetTime
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Short>
asShort()
Define a field type whose values are represented as aShort
in Hibernate Search.StringIndexFieldTypeOptionsStep<?>
asString()
Define a field type whose values are represented as aString
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,Year>
asYear()
Define a field type whose values are represented as aYear
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,YearMonth>
asYearMonth()
Define a field type whose values are represented as aYearMonth
in Hibernate Search.StandardIndexFieldTypeOptionsStep<?,ZonedDateTime>
asZonedDateTime()
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 Detail
-
as
<F> StandardIndexFieldTypeOptionsStep<?,F> as(Class<F> valueType)
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.
-
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.
-
extension
default <T> T extension(IndexFieldTypeFactoryExtension<T> 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, ...).
-
-