Class BytesRefFieldComparatorSource


public class BytesRefFieldComparatorSource
extends IndexFieldData.XFieldComparatorSource
Comparator source for string/binary values.
  • Constructor Details

  • Method Details

    • reducedType

      public reducedType()
      Specified by:
      reducedType in class IndexFieldData.XFieldComparatorSource
    • missingValue

      public java.lang.Object missingValue​(boolean reversed)
      Description copied from class: IndexFieldData.XFieldComparatorSource
      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.
      missingValue in class IndexFieldData.XFieldComparatorSource
    • getValues

      protected SortedBinaryDocValues getValues​(org.apache.lucene.index.LeafReaderContext context) throws
    • setScorer

      protected void setScorer​( scorer)
    • newComparator

      public<?> newComparator​(java.lang.String fieldname, int numHits, int sortPos, boolean reversed)
      Specified by:
      newComparator in class