lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1235234 - in /lucene/dev/branches/branch_3x: ./ lucene/ lucene/CHANGES.txt lucene/src/java/org/apache/lucene/util/ReaderUtil.java
Date Tue, 24 Jan 2012 12:57:17 GMT
Author: uschindler
Date: Tue Jan 24 12:57:17 2012
New Revision: 1235234

URL: http://svn.apache.org/viewvc?rev=1235234&view=rev
Log:
Merged revision(s) 1235228 from lucene/dev/trunk:
LUCENE-3712: Removed unused and untested ReaderUtil#subReader methods

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/lucene/CHANGES.txt
    lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/ReaderUtil.java

Modified: lucene/dev/branches/branch_3x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/CHANGES.txt?rev=1235234&r1=1235233&r2=1235234&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/lucene/CHANGES.txt Tue Jan 24 12:57:17 2012
@@ -57,6 +57,9 @@ Changes in backwards compatibility polic
   behavior.  Added seekExact() to FSTEnum, and added FST.save/read 
   from a File. (Mike McCandless, Dawid Weiss, Robert Muir)
   
+* LUCENE-3712: Removed unused and untested ReaderUtil#subReader methods.
+  (Uwe Schindler)
+  
 Security fixes
 
 * LUCENE-3588: Try harder to prevent SIGSEGV on cloned MMapIndexInputs:

Modified: lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/ReaderUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/ReaderUtil.java?rev=1235234&r1=1235233&r2=1235234&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/ReaderUtil.java (original)
+++ lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/ReaderUtil.java Tue
Jan 24 12:57:17 2012
@@ -94,43 +94,6 @@ public final class ReaderUtil {
   }
 
   /**
-   * Returns sub IndexReader that contains the given document id.
-   *    
-   * @param doc id of document
-   * @param reader parent reader
-   * @return sub reader of parent which contains the specified doc id
-   */
-  public static IndexReader subReader(int doc, IndexReader reader) {
-    List<IndexReader> subReadersList = new ArrayList<IndexReader>();
-    ReaderUtil.gatherSubReaders(subReadersList, reader);
-    IndexReader[] subReaders = subReadersList
-        .toArray(new IndexReader[subReadersList.size()]);
-    int[] docStarts = new int[subReaders.length];
-    int maxDoc = 0;
-    for (int i = 0; i < subReaders.length; i++) {
-      docStarts[i] = maxDoc;
-      maxDoc += subReaders[i].maxDoc();
-    }
-    return subReaders[ReaderUtil.subIndex(doc, docStarts)];
-  }
-  
-  /**
-   * Returns sub-reader subIndex from reader.
-   * 
-   * @param reader parent reader
-   * @param subIndex index of desired sub reader
-   * @return the subreader at subIndex
-   */
-  public static IndexReader subReader(IndexReader reader, int subIndex) {
-    List<IndexReader> subReadersList = new ArrayList<IndexReader>();
-    ReaderUtil.gatherSubReaders(subReadersList, reader);
-    IndexReader[] subReaders = subReadersList
-        .toArray(new IndexReader[subReadersList.size()]);
-    return subReaders[subIndex];
-  }
-
-
-  /**
    * Returns index of the searcher/reader for document <code>n</code> in the
    * array used to construct this searcher/reader.
    */



Mime
View raw message