java.lang.Object
org.apache.lucene.search.FieldComparator<Long>
org.apache.lucene.search.SimpleFieldComparator<Long>
org.apache.lucene.search.FieldComparator.NumericComparator<Long>
com.atlassian.jira.issue.search.parameters.lucene.sort.LongComparator
All Implemented Interfaces:
org.apache.lucene.search.LeafFieldComparator

@Deprecated(since="10.7", forRemoval=true) public class LongComparator extends org.apache.lucene.search.FieldComparator.NumericComparator<Long>
Deprecated, for removal: This API element is subject to removal in a future version.
Based on FieldComparator.LongComparator, this version is modified to not eagerly allocate very large arrays.
Parses field's values as long (using LeafReader.getNumericDocValues(String) and sorts by ascending value
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator

    org.apache.lucene.search.FieldComparator.DocComparator, org.apache.lucene.search.FieldComparator.DoubleComparator, org.apache.lucene.search.FieldComparator.FloatComparator, org.apache.lucene.search.FieldComparator.IntComparator, org.apache.lucene.search.FieldComparator.LongComparator, org.apache.lucene.search.FieldComparator.NumericComparator<T extends Number>, org.apache.lucene.search.FieldComparator.RelevanceComparator, org.apache.lucene.search.FieldComparator.TermOrdValComparator, org.apache.lucene.search.FieldComparator.TermValComparator
  • Field Summary

    Fields inherited from class org.apache.lucene.search.FieldComparator.NumericComparator

    currentReaderValues, field, missingValue
  • Constructor Summary

    Constructors
    Constructor
    Description
    LongComparator(int numHits, String field, Long missingValue)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new comparator based on Long.compare(long, long) for numHits.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compare(int slot1, int slot2)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    compareBottom(int doc)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    compareTop(int doc)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    copy(int slot, int doc)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setBottom(int bottom)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    value(int slot)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.apache.lucene.search.FieldComparator.NumericComparator

    doSetNextReader, getNumericDocValues

    Methods inherited from class org.apache.lucene.search.SimpleFieldComparator

    getLeafComparator, setScorer

    Methods inherited from class org.apache.lucene.search.FieldComparator

    compareValues

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LongComparator

      public LongComparator(int numHits, String field, Long missingValue)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new comparator based on Long.compare(long, long) for numHits. When a document has no value for the field, missingValue is substituted.
  • Method Details

    • compare

      public int compare(int slot1, int slot2)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      compare in class org.apache.lucene.search.FieldComparator<Long>
    • compareBottom

      public int compareBottom(int doc) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • copy

      public void copy(int slot, int doc) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • setBottom

      public void setBottom(int bottom)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTopValue

      public void setTopValue(Long value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setTopValue in class org.apache.lucene.search.FieldComparator<Long>
    • value

      public Long value(int slot)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      value in class org.apache.lucene.search.FieldComparator<Long>
    • compareTop

      public int compareTop(int doc) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException