public class MappedSortComparator
extends org.apache.lucene.search.FieldComparatorSource
We believe that most searches in very large JIRA installations will return a very small portion of the document index, either because they are over only one of many projects or they return only open issues, especially on dashboards and in GreenHopper and similar plugins as well as in general navigator searches.
Modifier and Type | Class and Description |
---|---|
class |
MappedSortComparator.InternalFieldComparator |
Constructor and Description |
---|
MappedSortComparator(LuceneFieldSorter sorter) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Object |
getComparable(String termtext)
Returns an object which, when sorted according by the comparator returned from
LuceneFieldSorter.getComparator() , will order the Term values in the correct order. |
Comparator |
getComparator() |
int |
hashCode() |
org.apache.lucene.search.FieldComparator |
newComparator(String fieldname,
int numHits,
int sortPos,
boolean reversed) |
public MappedSortComparator(LuceneFieldSorter sorter)
public org.apache.lucene.search.FieldComparator newComparator(String fieldname, int numHits, int sortPos, boolean reversed)
newComparator
in class org.apache.lucene.search.FieldComparatorSource
public Object getComparable(String termtext)
LuceneFieldSorter.getComparator()
, will order the Term values in the correct order. For example, if the
Terms contained integer values, this method would return new Integer(termtext)
. Note that this
might not always be the most efficient implementation - for this particular example, a better implementation
might be to make a ScoreDocLookupComparator that uses an internal lookup table of int.
termtext
- The textual value of the term.termtext
that can be sorted by LuceneFieldSorter.getComparator()
Comparable
,
FieldComparator
public Comparator getComparator()
Copyright © 2002-2024 Atlassian. All Rights Reserved.