Hi Alireza, Would this work? Sort the results by age desc, then loop through the results as long as age == age[0].
-sujit On Tue, 2011-10-18 at 15:23 -0700, Otis Gospodnetic wrote: > Hi, > > Are you just looking for: > > age:<target age> > > This will return all documents/records where age field is equal to target age. > > But maybe you want > > age:[0 TO <target age here>] > > This will include people aged from 0 to target age. > > Otis > ---- > Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch > Lucene ecosystem search :: http://search-lucene.com/ > > > >________________________________ > >From: Alireza Salimi <alireza.sal...@gmail.com> > >To: solr-user@lucene.apache.org > >Sent: Tuesday, October 18, 2011 10:15 AM > >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 > > > > > >