Annotation Type ScaledNumberField


@Documented @Target({METHOD,FIELD}) @Retention(RUNTIME) @Repeatable(List.class) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.impl.ScaledNumberFieldProcessor.class,retrieval=CONSTRUCTOR)) public @interface ScaledNumberField
Maps a property to a scaled number field in the index, i.e. a numeric field for integer or floating-point values that require a higher precision than doubles but always have roughly the same scale.

Useful for BigDecimal and BigInteger in particular.

See Also:
  • Element Details

    • name

      String name
      Returns:
      The name of the index field.
      Default:
      ""
    • decimalScale

      int decimalScale
      Returns:
      How the scale of values should be adjusted before indexing as a fixed-precision integer. A positive decimalScale will shift the decimal point to the right before rounding to the nearest integer and indexing, effectively retaining that many digits after the decimal place in the index. Since numbers are indexed with a fixed number of bits, this increase in precision also means that the maximum value that can be indexed will be smaller. A negative decimalScale will shift the decimal point to the left before rounding to the nearest integer and indexing, effectively setting that many of the smaller digits to zero in the index. Since numbers are indexed with a fixed number of bits, this decrease in precision also means that the maximum value that can be indexed will be larger.
      Default:
      2147483647
    • projectable

      Projectable projectable
      Returns:
      Whether projections are enabled for this field.
      See Also:
      Default:
      DEFAULT
    • sortable

      Sortable sortable
      Returns:
      Whether this field should be sortable.
      See Also:
      Default:
      DEFAULT
    • searchable

      Searchable searchable
      Returns:
      Whether this field should be searchable.
      See Also:
      Default:
      DEFAULT
    • aggregable

      Aggregable aggregable
      Returns:
      Whether aggregations are enabled for this field.
      See Also:
      Default:
      DEFAULT
    • indexNullAs

      String indexNullAs
      Returns:
      A value used instead of null values when indexing.
      See Also:
      Default:
      "__HibernateSearch_indexNullAs_default"
    • valueBridge

      ValueBridgeRef valueBridge
      Returns:
      A reference to the value bridge to use for this field. Must not be set if valueBinder() is set.
      See Also:
      Default:
      @org.hibernate.search.mapper.pojo.bridge.mapping.annotation.ValueBridgeRef
    • valueBinder

      ValueBinderRef valueBinder
      Returns:
      A reference to the value binder to use for this field. Must not be set if valueBridge() is set.
      See Also:
      Default:
      @org.hibernate.search.mapper.pojo.bridge.mapping.annotation.ValueBinderRef
    • extraction

      Returns:
      A definition of container extractors to be applied to the property allowing the binding of a value bridge to container elements. By default, Hibernate Search will try to apply a set of extractors for common container types.
      See Also:
      Default:
      @org.hibernate.search.mapper.pojo.extractor.mapping.annotation.ContainerExtraction