You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Varun Gupta <va...@gmail.com> on 2014/05/01 11:29:05 UTC

Getting min and max of a solr field for each group while doing field collapsing/result grouping

Hi,

I am using SolrCloud for getting results grouped by a particular field.
Now, I also want to get min and max value for a particular field for each
group. For example, if I am grouping results by city, then I also want to
get the minimum and maximum price for each city.

Is this possible to do with Solr.

Thanks in Advance!

--
Varun Gupta

Re: Getting min and max of a solr field for each group while doing field collapsing/result grouping

Posted by Varun Gupta <va...@gmail.com>.
Hi Ahmet,

Thanks for the information! But as per Solr documentation, group.truncate
is not supported in distributed searches and I am looking for a solution
that can work on SolrCloud.

--
Varun Gupta

On Thu, May 1, 2014 at 4:12 PM, Ahmet Arslan <io...@yahoo.com> wrote:

> Hi Varun,
>
> I think you can use group.truncate=true with stats component
> http://wiki.apache.org/solr/StatsComponent
>
>
> If true, facet counts are based on the most relevant document of each
> group matching the query. Same applies for StatsComponent. Default is
> false. <!> Solr3.4 Supported from Solr 3.4 and up.
>
> On Thursday, May 1, 2014 12:30 PM, Varun Gupta <va...@gmail.com>
> wrote:
>
> Hi,
>
> I am using SolrCloud for getting results grouped by a particular field.
> Now, I also want to get min and max value for a particular field for each
> group. For example, if I am grouping results by city, then I also want to
> get the minimum and maximum price for each city.
>
> Is this possible to do with Solr.
>
> Thanks in Advance!
>
> --
> Varun Gupta
>

Re: Getting min and max of a solr field for each group while doing field collapsing/result grouping

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Varun,

I think you can use group.truncate=true with stats component http://wiki.apache.org/solr/StatsComponent
    

If true, facet counts are based on the most relevant document of each group matching the query. Same applies for StatsComponent. Default is false. <!> Solr3.4 Supported from Solr 3.4 and up.

On Thursday, May 1, 2014 12:30 PM, Varun Gupta <va...@gmail.com> wrote:

Hi,

I am using SolrCloud for getting results grouped by a particular field.
Now, I also want to get min and max value for a particular field for each
group. For example, if I am grouping results by city, then I also want to
get the minimum and maximum price for each city.

Is this possible to do with Solr.

Thanks in Advance!

--
Varun Gupta