mirror of https://github.com/apache/lucene.git
LUCENE-4152: add one syllable method to enumerate subreaders
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1372645 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f1969b13c7
commit
0e9d4c7459
|
@ -31,6 +31,10 @@ API Changes
|
||||||
and exposes Iterator, so you can iterate over field names with
|
and exposes Iterator, so you can iterate over field names with
|
||||||
for (String field : fields) instead. (Robert Muir)
|
for (String field : fields) instead. (Robert Muir)
|
||||||
|
|
||||||
|
* LUCENE-4152: added IndexReader.leaves(), which lets you enumerate
|
||||||
|
the leaf atomic reader contexts for all readers in the tree.
|
||||||
|
(Uwe Schindler, Robert Muir)
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
|
|
||||||
* LUCENE-4297: BooleanScorer2 would multiply the coord() factor
|
* LUCENE-4297: BooleanScorer2 would multiply the coord() factor
|
||||||
|
|
|
@ -21,6 +21,7 @@ import java.io.Closeable;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
@ -396,6 +397,13 @@ public abstract class IndexReader implements Closeable {
|
||||||
* @lucene.experimental
|
* @lucene.experimental
|
||||||
*/
|
*/
|
||||||
public abstract IndexReaderContext getTopReaderContext();
|
public abstract IndexReaderContext getTopReaderContext();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the reader's leaves, or itself if this reader is Atomic.
|
||||||
|
*/
|
||||||
|
public final List<AtomicReaderContext> leaves() {
|
||||||
|
return getTopReaderContext().leaves();
|
||||||
|
}
|
||||||
|
|
||||||
/** Expert: Returns a key for this IndexReader, so FieldCache/CachingWrapperFilter can find
|
/** Expert: Returns a key for this IndexReader, so FieldCache/CachingWrapperFilter can find
|
||||||
* it again.
|
* it again.
|
||||||
|
|
Loading…
Reference in New Issue