lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wolfgang Hoschek <whosc...@lbl.gov>
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...

Cheers,
Wolfgang.


---------------------------------------------------------------------
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