LUCENE-5493: remove dead code

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5493@1574925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2014-03-06 15:39:35 +00:00
parent 38eb9cc96c
commit e53d664215
2 changed files with 1 additions and 41 deletions

View File

@ -36,14 +36,6 @@ import org.apache.lucene.util.packed.MonotonicAppendingLongBuffer;
*/
abstract class Sorter {
/** A comparator that keeps documents in index order. */
public static final DocComparator INDEX_ORDER_COMPARATOR = new DocComparator() {
@Override
public int compare(int docID1, int docID2) {
return docID1 - docID2;
}
};
/**
* A permutation of doc IDs. For every document ID between <tt>0</tt> and
* {@link IndexReader#maxDoc()}, <code>oldToNew(newToOld(docID))</code> must
@ -89,38 +81,6 @@ abstract class Sorter {
}
/**
* Sorts documents in reverse order. <b>NOTE</b>: This {@link Sorter} is not
* idempotent. Sorting an {@link AtomicReader} once or twice will return two
* different {@link AtomicReader} views. This {@link Sorter} should not be
* used with {@link SortingMergePolicy}.
*/
public static final Sorter REVERSE_DOCS = new Sorter() {
@Override
public DocMap sort(final AtomicReader reader) throws IOException {
final int maxDoc = reader.maxDoc();
return new DocMap() {
@Override
public int oldToNew(int docID) {
return maxDoc - docID - 1;
}
@Override
public int newToOld(int docID) {
return maxDoc - docID - 1;
}
@Override
public int size() {
return maxDoc;
}
};
}
@Override
public String getID() {
return "ReverseDocs";
}
};
private static final class DocValueSorter extends TimSorter {
private final int[] docs;

View File

@ -47,7 +47,7 @@ import org.apache.lucene.util.packed.MonotonicAppendingLongBuffer;
* to have sequentially-assigned doc IDs, this policy will scatter doc IDs.
* <p><b>NOTE</b>: This {@link MergePolicy} should only be used with idempotent
* {@link Sort}s so that the order of segments is predictable. For example,
* using {@link SortingMergePolicy} with {@link Sorter#REVERSE_DOCS} (which is
* using {@link SortingMergePolicy} with {@link Sort#INDEXORDER in reverse} (which is
* not idempotent) will make the order of documents in a segment depend on the
* number of times the segment has been merged.
* @lucene.experimental */