mirror of https://github.com/apache/lucene.git
LUCENE-3606: Make IndexReader really read-only - hide an accidentally visible method again, fix javadocs
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1212294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
905a0f211c
commit
c59a66679a
|
@ -59,7 +59,7 @@ class DirectoryReader extends IndexReader implements Cloneable {
|
||||||
|
|
||||||
private final boolean applyAllDeletes;
|
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 {
|
final int termInfosIndexDivisor) throws CorruptIndexException, IOException {
|
||||||
return (IndexReader) new SegmentInfos.FindSegmentsFile(directory) {
|
return (IndexReader) new SegmentInfos.FindSegmentsFile(directory) {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -295,11 +295,11 @@ public abstract class IndexReader implements Cloneable,Closeable {
|
||||||
* @throws IOException if there is a low-level IO error
|
* @throws IOException if there is a low-level IO error
|
||||||
*/
|
*/
|
||||||
public static IndexReader open(final Directory directory) throws CorruptIndexException, IOException {
|
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
|
/** Expert: Returns a IndexReader reading the index in the given
|
||||||
* Directory
|
* Directory with the given termInfosIndexDivisor.
|
||||||
* @param directory the index directory
|
* @param directory the index directory
|
||||||
* @param termInfosIndexDivisor Subsamples which indexed
|
* @param termInfosIndexDivisor Subsamples which indexed
|
||||||
* terms are loaded into RAM. This has the same effect as {@link
|
* terms are loaded into RAM. This has the same effect as {@link
|
||||||
|
@ -315,7 +315,7 @@ public abstract class IndexReader implements Cloneable,Closeable {
|
||||||
* @throws IOException if there is a low-level IO error
|
* @throws IOException if there is a low-level IO error
|
||||||
*/
|
*/
|
||||||
public static IndexReader open(final Directory directory, int termInfosIndexDivisor) throws CorruptIndexException, IOException {
|
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 @@ public abstract class IndexReader implements Cloneable,Closeable {
|
||||||
* @throws IOException if there is a low-level IO error
|
* @throws IOException if there is a low-level IO error
|
||||||
*/
|
*/
|
||||||
public static IndexReader open(final IndexCommit commit) throws CorruptIndexException, IOException {
|
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
|
/** Expert: returns an IndexReader reading the index in the given
|
||||||
* {@link IndexCommit}.
|
* {@link IndexCommit} and termInfosIndexDivisor.
|
||||||
* @param directory the index directory
|
|
||||||
* @param commit the commit point to open
|
* @param commit the commit point to open
|
||||||
* @param termInfosIndexDivisor Subsamples which indexed
|
* @param termInfosIndexDivisor Subsamples which indexed
|
||||||
* terms are loaded into RAM. This has the same effect as {@link
|
* terms are loaded into RAM. This has the same effect as {@link
|
||||||
|
@ -369,8 +368,8 @@ public abstract class IndexReader implements Cloneable,Closeable {
|
||||||
* @throws CorruptIndexException if the index is corrupt
|
* @throws CorruptIndexException if the index is corrupt
|
||||||
* @throws IOException if there is a low-level IO error
|
* @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 {
|
public static IndexReader open(final IndexCommit commit, int termInfosIndexDivisor) throws CorruptIndexException, IOException {
|
||||||
return DirectoryReader.open(directory, commit, termInfosIndexDivisor);
|
return DirectoryReader.open(commit.getDirectory(), commit, termInfosIndexDivisor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue