You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by darniz <rn...@edmunds.com> on 2009/05/14 23:30:12 UTC
Getting Results by grouping in solr
hello everybody
i have to return document from solr only for the latest year. LIke for
example i have 3 documents for 2009 honda accord Coupe bodystyle and two for
2008 honda accord coupe bodystyle. i need to get the latest of results for
make,model,bodyStyle. If i give the query
make:Honda+model:Accord+bodyStyle:Coupe
i get all the entries i want only max year returned ie only 2009 styles,
hence my end resutl should be only 3 doc. Is there a max function in solr.
doc>
<field name="year">2009</year>
<field name="make">Honda</year>
<field name="model">Accord</year>
<field name="bodyStyle">Coupe</year>
<field name="id">1</1>
</doc>
<doc>
<field name="year">2009</year>
<field name="make">Honda</year>
<field name="model">Accord</year>
<field name="bodyStyle">Coupe</year>
<field name="id">2</1>
</doc>
<doc>
<field name="year">2009</year>
<field name="make">Honda</year>
<field name="model">Accord</year>
<field name="bodyStyle">Coupe</year>
<field name="id">3</1>
</doc>
<doc>
<field name="year">2008</year>
<field name="make">Honda</year>
<field name="model">Accord</year>
<field name="bodyStyle">Coupe</year>
<field name="id">4</1>
</doc>
<doc>
<field name="year">2008</year>
<field name="make">Honda</year>
<field name="model">Accord</year>
<field name="bodyStyle">Coupe</year>
<field name="id">3</1>
</doc>
--
View this message in context: http://www.nabble.com/Getting-Results-by-grouping-in-solr-tp23549332p23549332.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: Getting Results by grouping in solr
Posted by Noble Paul നോബിള് नोब्ळ् <no...@corp.aol.com>.
I do not think it is easily possible.
solr has a max function but I do not think it is usable here.
On Fri, May 15, 2009 at 11:43 PM, darniz <rn...@edmunds.com> wrote:
>
> Any body
> any advice
> --
> View this message in context: http://www.nabble.com/Getting-Results-by-grouping-in-solr-tp23549332p23564842.html
> Sent from the Solr - Dev mailing list archive at Nabble.com.
>
>
--
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com
Re: Getting Results by grouping in solr
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Wrong list.
Use solr-user instead.
Look at SOLR-236.
Check markmail.org.
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: darniz <rn...@edmunds.com>
> To: solr-dev@lucene.apache.org
> Sent: Friday, May 15, 2009 2:13:02 PM
> Subject: Re: Getting Results by grouping in solr
>
>
> Any body
> any advice
> --
> View this message in context:
> http://www.nabble.com/Getting-Results-by-grouping-in-solr-tp23549332p23564842.html
> Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: Getting Results by grouping in solr
Posted by darniz <rn...@edmunds.com>.
Any body
any advice
--
View this message in context: http://www.nabble.com/Getting-Results-by-grouping-in-solr-tp23549332p23564842.html
Sent from the Solr - Dev mailing list archive at Nabble.com.