lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Min/max support in Lucene
Date Mon, 25 Feb 2013 10:24:36 GMT
TermsEnum will give you the first, and the last if you loop through to
the end.  Generally pretty fast.  Or skip through with seekCeil() -
might be faster.


--
Ian.


On Wed, Feb 20, 2013 at 11:31 PM, Vitaly Funstein <vfunstein@gmail.com> wrote:
> I know that general questions about aggregate functions have been asked
> here before a number of times, but I would like to figure out how to solve
> at least one specific subset of this issue. Namely, given a specific
> indexed field, how do I efficiently get the min/max value of the field in
> the index? Maybe I'm being naive but this sounds like it should be a super
> simple task conceptually, since under the hood the index is a sorted data
> structure. Of course, the ultimate idea here is to be able to do this
> efficiently for the most general case, i.e. to apply range discovery to
> query results, and perhaps do this for string fields as well as numeric.

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


Mime
View raw message