lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r819130 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/search/IndexSearcher.java
Date Sat, 26 Sep 2009 13:02:48 GMT
Author: mikemccand
Date: Sat Sep 26 13:02:48 2009
New Revision: 819130

URL: http://svn.apache.org/viewvc?rev=819130&view=rev
Log:
LUCENE-1925: open up IndexSearcher a bit for expert usage

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/search/IndexSearcher.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=819130&r1=819129&r2=819130&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Sat Sep 26 13:02:48 2009
@@ -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

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/IndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/IndexSearcher.java?rev=819130&r1=819129&r2=819130&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/IndexSearcher.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/IndexSearcher.java Sat Sep 26 13:02:48
2009
@@ -50,8 +50,11 @@
 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 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;



Mime
View raw message