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 Carl-Johan Syrén <ca...@slu.se> on 2018/04/10 07:40:05 UTC

Collapse in facet

Hi

I use fq= '{!collapse field=id_publ}' in a question to get distinct publications id:s, it works fine. Then i got three facets and in one of them i want to collapse on another level.
For each organisation id i want to count distinct publication id:s. To do that i start with suppressing the collapse in fq (facet.field={!ex=collapse}id_publ), but i dont knew how to count the distinct publication id:s for each organisation id.
Does anyone have an idea how to do it?
I use Solr 7.2.1 .

Regards

Carl-Johan Syrén


RE: Collapse in facet

Posted by Carl-Johan Syrén <ca...@slu.se>.
Thanks for the help, i found the solution in JSON facet API.

Regards

Carl Johan Syrén

-----Original Message-----
From: Joel Bernstein <jo...@gmail.com> 
Sent: den 10 april 2018 14:48
To: solr-user@lucene.apache.org
Subject: Re: Collapse in facet

It sounds like the JSON facet API could do what you are describing. I haven't tried the exclusion of the collapse filter with the JSON facet API but I suspect it will work.

Joel Bernstein
http://joelsolr.blogspot.com/

On Tue, Apr 10, 2018 at 3:40 AM, Carl-Johan Syrén <ca...@slu.se>
wrote:

> Hi
>
> I use fq= '{!collapse field=id_publ}' in a question to get distinct 
> publications id:s, it works fine. Then i got three facets and in one 
> of them i want to collapse on another level.
> For each organisation id i want to count distinct publication id:s. To 
> do that i start with suppressing the collapse in fq 
> (facet.field={!ex=collapse}id_publ), but i dont knew how to count the 
> distinct publication id:s for each organisation id.
> Does anyone have an idea how to do it?
> I use Solr 7.2.1 .
>
> Regards
>
> Carl-Johan Syrén
>
>

Re: Collapse in facet

Posted by Joel Bernstein <jo...@gmail.com>.
It sounds like the JSON facet API could do what you are describing. I
haven't tried the exclusion of the collapse filter with the JSON facet API
but I suspect it will work.

Joel Bernstein
http://joelsolr.blogspot.com/

On Tue, Apr 10, 2018 at 3:40 AM, Carl-Johan Syrén <ca...@slu.se>
wrote:

> Hi
>
> I use fq= '{!collapse field=id_publ}' in a question to get distinct
> publications id:s, it works fine. Then i got three facets and in one of
> them i want to collapse on another level.
> For each organisation id i want to count distinct publication id:s. To do
> that i start with suppressing the collapse in fq
> (facet.field={!ex=collapse}id_publ), but i dont knew how to count the
> distinct publication id:s for each organisation id.
> Does anyone have an idea how to do it?
> I use Solr 7.2.1 .
>
> Regards
>
> Carl-Johan Syrén
>
>