lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: [Performance] Streaming main memory indexing of single strings
Date Mon, 02 May 2005 21:32:41 GMT
Wolfgang,

On Monday 02 May 2005 23:21, Wolfgang Hoschek wrote:
> 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.

Yes, the svn trunk uses skipTo more often than 1.4.3.

However, your implementation of skipTo() needs some improvement.
See the javadoc of skipTo of class Scorer:

http://lucene.apache.org/java/docs/api/org/apache/lucene/search/Scorer.html#skipTo(int)

In case the underlying scorers provide skipTo() it's even better to use that.

Regards,
Paul Elschot


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message