lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wolfgang Hoschek <>
Subject Re: [Performance] Streaming main memory indexing of single strings
Date Mon, 02 May 2005 22:26:15 GMT
>> The version I sent returns in O(1), if performance was your concern. 
>> Or
>> did you mean something else?
> Since 0 is the only document number in the index, a
> return target == 0;
> might be nice for skipTo(). It doesn't really help performance, though,
> and the next() works just as well.
> Regards,
> Paul Elschot.

It's not just "return target == 0". Internally next() switches a 
hasNext flag to false, and that makes it a safer operation...

BTW, did you give the unit tests a shot? Or even better, run it against 
some of your own queries/test data? That might help to shake out other 
bugs that might potentially be lurking in remote corners...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message