I don't know anything about your environment, so maybe this doesn't make sense, 
but maybe you can check your source system (database or whatnot) to get the 
max_age, then search for the max_age in your Solr index.

It's not as elegant, but may be a lot easier.

To reduce the risk of interacting with potentially stale data, you may want to 
change your = to >= or whatever is appropriate.


Brandon Ramirez | Office: 585.214.5413 | Fax: 585.295.4848 
Software Engineer II | Element K | www.elementk.com


-----Original Message-----
From: Alireza Salimi [mailto:alireza.sal...@gmail.com] 
Sent: Tuesday, October 18, 2011 10:15 AM
To: solr-user@lucene.apache.org
Subject: Re: Find Documents with field = maxValue

Hi Ahmet,

Thanks for your reply, but I want ALL documents with age = max_age.


On Tue, Oct 18, 2011 at 9:59 AM, Ahmet Arslan <iori...@yahoo.com> wrote:

>
>
> --- On Tue, 10/18/11, Alireza Salimi <alireza.sal...@gmail.com> wrote:
>
> > From: Alireza Salimi <alireza.sal...@gmail.com>
> > Subject: Find Documents with field = maxValue
> > To: solr-user@lucene.apache.org
> > Date: Tuesday, October 18, 2011, 4:10 PM Hi,
> >
> > It might be a naive question.
> > Assume we have a list of Document, each Document contains the 
> > information of a person, there is a numeric field named 'age', how 
> > can we find those Documents whose
> > *age* field
> > is *max(age) *in one query.
>
> May be http://wiki.apache.org/solr/StatsComponent?
>
> Or sort by age?  q=*:*&start=0&rows=1&sort=age desc
>



--
Alireza Salimi
Java EE Developer

Reply via email to