org.hibernate.search.query.dsl.sort

## Interface SortMissingValueContext<T>

- All Known Implementing Classes:
    ConnectedSortFieldContext

      public interface SortMissingValueContext<T>

  Author:
    Emmanuel Bernard emmanuel@hibernate.org, Yoann Rodiere

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `sortFirst()` Put documents with missing values first in the sorting.
    `T` | `sortLast()` Put documents with missing values last in the sorting.
    `T` | `use(Object value)` When documents are missing a value on the sort field, use the given value instead.

- - ### Method Detail

    - #### sortLast

          T sortLast()

      Put documents with missing values last in the sorting.

      This instruction is independent of whether the sort is being ascending or descending.

    - #### sortFirst

          T sortFirst()

      Put documents with missing values first in the sorting.

      This instruction is independent of whether the sort is being ascending or descending.

    - #### use

          T use(Object value)

      When documents are missing a value on the sort field, use the given value instead.

      Lucene sort API limits this feature to numeric fields. As Hibernate Search sorts are currently based on the Lucene API underneath, this is only available for numeric fields for all the indexing services, Elasticsearch included.

      Field bridges, if any, will be ignored. Thus the actual numeric value must be provided.

      Throws:
        `SearchException` - If the field is not numeric.

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved