lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Lindberg" <>
Subject SV: Find "latest" document (before a certain date)
Date Wed, 29 Aug 2007 10:29:45 GMT
> Från: Karl Wettin [] 
> 28 aug 2007 kl. 17.48 skrev Per Lindberg:
> > Now, I want to search the content, and return only the
> > LATEST found document with each id. To complicate
> > things a bit, I want the latest before a given date. In other
> > words, for each id pick only the one with the highest date
> > less than x.
> Given you added documents with version time stamp in chronological
> order, how about using a RangeQuery and pick the hit with the
> greatest document number?

Yep, that did the trick! There seems to be no Filter that can do
the final picking of the highest date, so I had to do that after the

I use with a RangeFilter,
I presume that's just as efficient as a RangeQuery?


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

View raw message