Class IndexFieldData.XFieldComparatorSource

java.lang.Object
org.apache.lucene.search.FieldComparatorSource
org.elasticsearch.index.fielddata.IndexFieldData.XFieldComparatorSource
Direct Known Subclasses:
BytesRefFieldComparatorSource, DoubleValuesComparatorSource, FloatValuesComparatorSource, LongValuesComparatorSource
Enclosing interface:
IndexFieldData<FD extends LeafFieldData>

public abstract static class IndexFieldData.XFieldComparatorSource extends org.apache.lucene.search.FieldComparatorSource
  • Field Details

  • Constructor Details

  • Method Details

    • sortMode

      public MultiValueMode sortMode()
    • nested

    • sortMissingFirst

      public static final boolean sortMissingFirst(Object missingValue)
      Whether missing values should be sorted first.
    • sortMissingLast

      public static final boolean sortMissingLast(Object missingValue)
      Whether missing values should be sorted last, this is the default.
    • missingObject

      public Object missingObject(Object missingValue, boolean reversed)
      Return the missing object value according to the reduced type of the comparator.
    • reducedType

      public abstract org.apache.lucene.search.SortField.Type reducedType()
    • missingValue

      public Object missingValue(boolean reversed)
      Return a missing value that is understandable by SortField.setMissingValue(Object). Most implementations return null because they already replace the value at the fielddata level. However this can't work in case of strings since there is no such thing as a string which compares greater than any other string, so in that case we need to return SortField.STRING_FIRST or SortField.STRING_LAST so that the coordinating node knows how to deal with null values.
    • newBucketedSort

      public abstract BucketedSort newBucketedSort(BigArrays bigArrays, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra)
      Create a BucketedSort which is useful for sorting inside of aggregations.