Interface FieldSortMissingValueBehaviorStep<N>

Type Parameters:
N - The type of the next step (returned by FieldSortMissingValueBehaviorGenericStep.first(), for example).
All Superinterfaces:
FieldSortMissingValueBehaviorGenericStep<Object,N>

public interface FieldSortMissingValueBehaviorStep<N> extends FieldSortMissingValueBehaviorGenericStep<Object,N>
The step in a sort definition where the behavior on missing values can be set.
Author:
Emmanuel Bernard emmanuel@hibernate.org
  • Method Details

    • use

      default N use(Object value)
      When documents are missing a value on the sort field, use the given value instead.

      This method will apply DSL converters to value before Hibernate Search attempts to interpret it as a field value. See ValueModel.MAPPING.

      Specified by:
      use in interface FieldSortMissingValueBehaviorGenericStep<Object,N>
      Parameters:
      value - The value to use as a default when a document is missing a value on the sort field.
      Returns:
      The next step.
      Throws:
      SearchException - If the field is not numeric.
    • use

      @Deprecated(since="7.2") default N use(Object value, ValueConvert convert)
      Deprecated.
      When documents are missing a value on the sort field, use the given value instead.
      Parameters:
      value - The value to use as a default when a document is missing a value on the sort field.
      convert - Controls how the value should be converted before Hibernate Search attempts to interpret it as a field value. See ValueConvert.
      Returns:
      The next step.
      Throws:
      SearchException - If the field is not numeric.
    • use

      N use(Object value, ValueModel valueModel)
      When documents are missing a value on the sort field, use the given value instead.
      Parameters:
      value - The value to use as a default when a document is missing a value on the sort field.
      valueModel - The model value, determines how the value should be converted before Hibernate Search attempts to interpret it as a field value. See ValueModel.
      Returns:
      The next step.
      Throws:
      SearchException - If the field is not numeric.