mirror of https://github.com/apache/lucene.git
revert LUCENE-781 for now
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@499176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fb60f574aa
commit
9a57076257
|
@ -332,11 +332,6 @@ Bug fixes
|
|||
life" due to this, just a possible future problem). (Chuck
|
||||
Williams via Mike McCandless)
|
||||
|
||||
33. LUCENE-781: Fixed the NullPointerException in MultiReader.isCurrent()
|
||||
and MultiReader.getVersion(). isCurrent() now returns true only if
|
||||
all its readers are current. getVersion() now throws an
|
||||
UnsupportedOperationException. (Daniel Naber)
|
||||
|
||||
Optimizations
|
||||
|
||||
1. LUCENE-586: TermDocs.skipTo() is now more efficient for
|
||||
|
|
|
@ -263,29 +263,6 @@ public class MultiReader extends IndexReader {
|
|||
return fieldSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if all readers are still up-to-date.
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public boolean isCurrent() throws IOException {
|
||||
for (int i = 0; i < subReaders.length; i++) {
|
||||
IndexReader reader = subReaders[i];
|
||||
if (!reader.isCurrent())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Not implemented.
|
||||
* @throws UnsupportedOperationException
|
||||
*/
|
||||
public long getVersion() {
|
||||
throw new UnsupportedOperationException("This method is only implemented in " +
|
||||
"IndexReader, not in MultiReader");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class MultiTermEnum extends TermEnum {
|
||||
|
|
|
@ -106,6 +106,7 @@ public class TestMultiReader extends TestCase {
|
|||
assertTrue(reader != null);
|
||||
}
|
||||
|
||||
/* known to fail, see https://issues.apache.org/jira/browse/LUCENE-781
|
||||
public void testIsCurrent() throws IOException {
|
||||
RAMDirectory ramDir1=new RAMDirectory();
|
||||
addDoc(ramDir1, "test foo", true);
|
||||
|
@ -134,5 +135,6 @@ public class TestMultiReader extends TestCase {
|
|||
iw.addDocument(doc);
|
||||
iw.close();
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue