Index: lucene/src/java/org/apache/lucene/index/DirectoryReader.java =================================================================== --- lucene/src/java/org/apache/lucene/index/DirectoryReader.java (revision 1212292) +++ lucene/src/java/org/apache/lucene/index/DirectoryReader.java (working copy) @@ -59,7 +59,7 @@ private final boolean applyAllDeletes; - public static IndexReader open(final Directory directory, final IndexCommit commit, + static IndexReader open(final Directory directory, final IndexCommit commit, final int termInfosIndexDivisor) throws CorruptIndexException, IOException { return (IndexReader) new SegmentInfos.FindSegmentsFile(directory) { @Override Index: lucene/src/java/org/apache/lucene/index/IndexReader.java =================================================================== --- lucene/src/java/org/apache/lucene/index/IndexReader.java (revision 1212292) +++ lucene/src/java/org/apache/lucene/index/IndexReader.java (working copy) @@ -295,11 +295,11 @@ * @throws IOException if there is a low-level IO error */ public static IndexReader open(final Directory directory) throws CorruptIndexException, IOException { - return open(directory, null, DEFAULT_TERMS_INDEX_DIVISOR); + return DirectoryReader.open(directory, null, DEFAULT_TERMS_INDEX_DIVISOR); } - /** Returns a IndexReader reading the index in the given - * Directory + /** Expert: Returns a IndexReader reading the index in the given + * Directory with the given termInfosIndexDivisor. * @param directory the index directory * @param termInfosIndexDivisor Subsamples which indexed * terms are loaded into RAM. This has the same effect as {@link @@ -315,7 +315,7 @@ * @throws IOException if there is a low-level IO error */ public static IndexReader open(final Directory directory, int termInfosIndexDivisor) throws CorruptIndexException, IOException { - return open(directory, null, termInfosIndexDivisor); + return DirectoryReader.open(directory, null, termInfosIndexDivisor); } /** @@ -348,13 +348,12 @@ * @throws IOException if there is a low-level IO error */ public static IndexReader open(final IndexCommit commit) throws CorruptIndexException, IOException { - return open(commit.getDirectory(), commit, DEFAULT_TERMS_INDEX_DIVISOR); + return DirectoryReader.open(commit.getDirectory(), commit, DEFAULT_TERMS_INDEX_DIVISOR); } /** Expert: returns an IndexReader reading the index in the given - * {@link IndexCommit}. - * @param directory the index directory + * {@link IndexCommit} and termInfosIndexDivisor. * @param commit the commit point to open * @param termInfosIndexDivisor Subsamples which indexed * terms are loaded into RAM. This has the same effect as {@link @@ -369,8 +368,8 @@ * @throws CorruptIndexException if the index is corrupt * @throws IOException if there is a low-level IO error */ - public static IndexReader open(final Directory directory, final IndexCommit commit, int termInfosIndexDivisor) throws CorruptIndexException, IOException { - return DirectoryReader.open(directory, commit, termInfosIndexDivisor); + public static IndexReader open(final IndexCommit commit, int termInfosIndexDivisor) throws CorruptIndexException, IOException { + return DirectoryReader.open(commit.getDirectory(), commit, termInfosIndexDivisor); } /**