Interface IndexFieldTypeFactory

All Known Subinterfaces:
ElasticsearchIndexFieldTypeFactory, LuceneIndexFieldTypeFactory

public interface IndexFieldTypeFactory
A factory for types of index fields.
  • Method Details

    • 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() or asInteger().

      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 given inputType is not supported.
    • asVector

      @Incubating <F> VectorFieldTypeOptionsStep<?,F> asVector(Class<F> valueType)
      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() or asFloatVector() 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 like byte[] or float[].
      Returns:
      A DSL step where the index vector field type can be defined in more details.
    • asString

      Define a field type whose values are represented as a String in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asInteger

      Define a field type whose values are represented as an Integer in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asLong

      Define a field type whose values are represented as a Long in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asBoolean

      Define a field type whose values are represented as a Boolean in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asByte

      Define a field type whose values are represented as a Byte in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asShort

      Define a field type whose values are represented as a Short in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asFloat

      Define a field type whose values are represented as a Float in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asDouble

      Define a field type whose values are represented as a Double in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asLocalDate

      Define a field type whose values are represented as a LocalDate in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asLocalDateTime

      Define a field type whose values are represented as a LocalDateTime in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asLocalTime

      Define a field type whose values are represented as a LocalTime in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asInstant

      Define a field type whose values are represented as an Instant in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asZonedDateTime

      Define a field type whose values are represented as a ZonedDateTime in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asYear

      Define a field type whose values are represented as a Year in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asYearMonth

      Define a field type whose values are represented as a YearMonth in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asMonthDay

      Define a field type whose values are represented as a MonthDay in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asOffsetDateTime

      Define a field type whose values are represented as an OffsetDateTime in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asOffsetTime

      Define a field type whose values are represented as an OffsetTime in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asGeoPoint

      Define a field type whose values are represented as a GeoPoint in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asBigDecimal

      Define a field type whose values are represented as a BigDecimal in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asBigInteger

      Define a field type whose values are represented as a BigInteger in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asByteVector

      @Incubating VectorFieldTypeOptionsStep<?,byte[]> asByteVector()
      Define a field type intended for use in vector search and whose values are represented as a byte[] in Hibernate Search.
      Returns:
      A DSL step where the index field type can be defined in more details.
    • asFloatVector

      @Incubating VectorFieldTypeOptionsStep<?,float[]> asFloatVector()
      Define a field type intended for use in vector search and whose values are represented as a float[] 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, ...).