Finally found and fixed the bug!
The fix is simply to replace MemoryIndex.MemoryIndexReader skipTo() with the following:


                                public boolean skipTo(int target) {
                                        if (DEBUG) System.err.println(".skipTo: 
" + target);
                                        return next();
                                }

Apparently lucene-1.4.3 didn't use skipTo() in a way that triggered the bug, while SVN does.

I now ran the tests over a much larger set of documents and all tests pass. Give it a shot :-)
Wolfgang.



On May 2, 2005, at 9:05 AM, Wolfgang Hoschek wrote:

I'm looking at it right now. The tests pass fine when you put lucene-1.4.3.jar instead of the current lucene onto the classpath which is what I've been doing so far. Something seems to have changed in the scoring calculation. No idea what that might be. I'll see if I can find out.

Wolfgang.

The test case is failing (type "ant test" at the contrib/memory working directory) with this:

[junit] Testcase: testMany(org.apache.lucene.index.memory.MemoryIndexTest): Caused an ERROR
[junit] BUG DETECTED:69 at query=term AND NOT phrase term, file=src/java/org/apache/lucene/index/memory/MemoryIndex.java, [EMAIL PROTECTED]
[junit] java.lang.IllegalStateException: BUG DETECTED:69 at query=term AND NOT phrase term, file=src/java/org/apache/lucene/index/memory/MemoryIndex.java, [EMAIL PROTECTED]
[junit] at org.apache.lucene.index.memory.MemoryIndexTest.run(MemoryIndexTest.jav a:305)
[junit] at org.apache.lucene.index.memory.MemoryIndexTest.testMany(MemoryIndexTes t.java:228)




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to