lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll" <>
Subject Re: Advanced timestamp usage (or global value storage)
Date Wed, 25 Aug 2004 16:25:10 GMT

I may be confused, as I understand it you said you were interested in
the last document indexed, Berhnard's code does that.   Lucene adds
documents sequentially, so counting backwards from the maxDoc() should
get you the last indexed document pretty quickly.  If all documents were
deleted, then this would go through all documents, otherwise, it is
going to find it pretty quickly.  It doesn't have to traverse through
all of the documents, it just has to find the "first" document that is
not deleted (since we are starting at the end of the list and going

>>> 8/25/2004 12:01:50 PM >>>
On Aug 25, 2004, at 11:57 AM, Grant Ingersoll wrote:

> You are right, in the worst case, this would be linear,

No, in _all_ cases this would be linear.

> I would bet, that on average,
> arguably nearly all cases, you would go through very few iterations
> before finding the doc you are interested in

Then you don't understand what I'm trying to do. I'm trying to find the

document with the biggest value for the field. That would involve 
checking the field's value in every document to ensure this.


Avi 'rlwimi' Drissman 
Argh! This darn mail server is trunca

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

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

View raw message