mirror of https://github.com/apache/lucene.git
LUCENE-1925: open up IndexSearcher a bit for expert usage
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@819130 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c390d49290
commit
a5e5dc8794
24
CHANGES.txt
24
CHANGES.txt
|
@ -1,6 +1,30 @@
|
|||
Lucene Change Log
|
||||
$Id$
|
||||
|
||||
======================= Trunk (not yet released) =======================
|
||||
|
||||
Changes in backwards compatibility policy
|
||||
|
||||
Changes in runtime behavior
|
||||
|
||||
API Changes
|
||||
|
||||
* LUCENE-1925: Make IndexSearcher's subReaders and docStarts members
|
||||
protected; add expert ctor to directly specify reader, subReaders
|
||||
and docStarts. (John Wang, Tim Smith via Mike McCandless)
|
||||
|
||||
Bug fixes
|
||||
|
||||
New features
|
||||
|
||||
Optimizations
|
||||
|
||||
Documentation
|
||||
|
||||
Build
|
||||
|
||||
Test Cases
|
||||
|
||||
======================= Release 2.9.0 2009-09-23 =======================
|
||||
|
||||
Changes in backwards compatibility policy
|
||||
|
|
|
@ -50,8 +50,11 @@ import org.apache.lucene.util.ReaderUtil;
|
|||
public class IndexSearcher extends Searcher {
|
||||
IndexReader reader;
|
||||
private boolean closeReader;
|
||||
private IndexReader[] subReaders;
|
||||
private int[] docStarts;
|
||||
|
||||
// NOTE: these members might change in incompatible ways
|
||||
// in the next release
|
||||
protected IndexReader[] subReaders;
|
||||
protected int[] docStarts;
|
||||
|
||||
/** Creates a searcher searching the index in the named directory.
|
||||
* @throws CorruptIndexException if the index is corrupt
|
||||
|
@ -106,6 +109,19 @@ public class IndexSearcher extends Searcher {
|
|||
public IndexSearcher(IndexReader r) {
|
||||
this(r, false);
|
||||
}
|
||||
|
||||
/** Expert: directly specify the reader, subReaders and
|
||||
* their docID starts.
|
||||
*
|
||||
* <p><b>NOTE:</b> This API is experimental and
|
||||
* might change in incompatible ways in the next
|
||||
* release.</font></p> */
|
||||
public IndexSearcher(IndexReader reader, IndexReader[] subReaders, int[] docStarts) {
|
||||
this.reader = reader;
|
||||
this.subReaders = subReaders;
|
||||
this.docStarts = docStarts;
|
||||
closeReader = false;
|
||||
}
|
||||
|
||||
private IndexSearcher(IndexReader r, boolean closeReader) {
|
||||
reader = r;
|
||||
|
|
Loading…
Reference in New Issue