mirror of https://github.com/apache/lucene.git
LUCENE-3918: Make SortingTerms.intersect return mapped docs enums.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1460165 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aba19484b9
commit
258fc9f41a
lucene/misc/src/java/org/apache/lucene/index/sorter
|
@ -44,6 +44,7 @@ import org.apache.lucene.util.ArrayUtil;
|
|||
import org.apache.lucene.util.Bits;
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.SorterTemplate;
|
||||
import org.apache.lucene.util.automaton.CompiledAutomaton;
|
||||
|
||||
/**
|
||||
* An {@link AtomicReader} which supports sorting documents by a given
|
||||
|
@ -102,6 +103,12 @@ public class SortingAtomicReader extends FilterAtomicReader {
|
|||
return new SortingTermsEnum(in.iterator(reuse), docMap, indexOptions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TermsEnum intersect(CompiledAutomaton compiled, BytesRef startTerm)
|
||||
throws IOException {
|
||||
return new SortingTermsEnum(in.intersect(compiled, startTerm), docMap, indexOptions);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class SortingTermsEnum extends FilterTermsEnum {
|
||||
|
|
Loading…
Reference in New Issue