|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.index.LuceneFieldComparator
Sort object at
search time. Sorting on returned ResultDocs is less efficient and may cause OutOfMemory errors on
large result sets.
public class LuceneFieldComparator
Compares two ResultDocs for sorting by a given Lucene field. Fields that are
encoded as a Dates will be sorted by Date, all others are sorted lexically. The lucene fields must be
stored as text or keyword. The name of the field to be sorted must be passed into the constructor of this
LuceneFieldComparator.
ResultDoc| Field Summary | |
|---|---|
static int |
ASCENDING
Deprecated. Used to sort in ascending order. |
static int |
DESCENDING
Deprecated. Used to sort in descending order. |
| Constructor Summary | |
|---|---|
LuceneFieldComparator(String fieldName,
int sortOrder)
Deprecated. Sorting should now be done by supplying a Sort object
at search time. Sorting on returned ResultDocs is less efficient and may cause OutOfMemory errors on
large result sets. |
|
| Method Summary | |
|---|---|
int |
compare(Object o1,
Object o2)
Deprecated. Compares two ResultDocs for sorting by a Lucene field, indicated at
construction time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Field Detail |
|---|
public static final int ASCENDING
public static final int DESCENDING
| Constructor Detail |
|---|
public LuceneFieldComparator(String fieldName,
int sortOrder)
Sort object
at search time. Sorting on returned ResultDocs is less efficient and may cause OutOfMemory errors on
large result sets.
fieldName - Field to sort bysortOrder - ASCENDING or DESCENDING| Method Detail |
|---|
public int compare(Object o1,
Object o2)
ResultDocs for sorting by a Lucene field, indicated at
construction time.Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
compare in interface Comparatoro1 - The first Object.o2 - The second Object.
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||