LUCENE-5690: MultiTerms should expose sub-Terms

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1597079 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2014-05-23 12:39:32 +00:00
parent 7954c8584d
commit 297f06ecb4
1 changed files with 10 additions and 0 deletions

View File

@ -68,6 +68,16 @@ public final class MultiTerms extends Terms {
hasPayloads = hasPositions && _hasPayloads; // if all subs have pos, and at least one has payloads.
}
/** Expert: returns the Terms being merged. */
public Terms[] getSubTerms() {
return subs;
}
/** Expert: returns pointers to the sub-readers corresponding to the Terms being merged. */
public ReaderSlice[] getSubSlices() {
return subSlices;
}
@Override
public TermsEnum intersect(CompiledAutomaton compiled, BytesRef startTerm) throws IOException {
final List<MultiTermsEnum.TermsEnumIndex> termsEnums = new ArrayList<>();