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 Andrii Berezhynskyi <an...@home24.de> on 2015/05/12 18:15:00 UTC
How is the most relevant document of each group chosen when
group.truncate is used?
Hi all,
When I use group.truncate and filtering I'm getting strange faceting
results. If I use just grouping without filtering:
group=true&group.field=parent_sku&group.ngroups=true&group.truncate=true&facet=true&facet.field=color,
then I get:
facet_fields": { "color": [ "white", 19742,
19742 white items.
However if I filter by white items:
group=true&group.field=parent_sku&group.ngroups=true&group.truncate=true&facet=true&facet.field=color&fq=color:white,
I'm getting 20543 items. The same happens when I use collapse query parser
instead of grouping.
I would expect those two numbers to be equal. So I assume the most relevant
document of each group is chosen somehow differently when filtering is
used. How can this be explained?
Best regards,
Andrii
Re: How is the most relevant document of each group chosen when
group.truncate is used?
Posted by Andrii Berezhynskyi <an...@home24.de>.
Forgot to mention that I'm using solr 5.0
Re: How is the most relevant document of each group chosen when
group.truncate is used?
Posted by Andrii Berezhynskyi <an...@home24.de>.
Ok. Figured out it myself. Research has shown that when group.truncate (or
collapsing query) is used then only head of the group is picked. That's why
results are different. However group.facet gives facet results that I would
want. The only thing that group.facet is very slow comparing to collapsing
query.
On Tue, May 12, 2015 at 6:15 PM, Andrii Berezhynskyi <
andrii.berezhynskyi@home24.de> wrote:
> Hi all,
>
> When I use group.truncate and filtering I'm getting strange faceting
> results. If I use just grouping without filtering:
>
>
> group=true&group.field=parent_sku&group.ngroups=true&group.truncate=true&facet=true&facet.field=color,
>
> then I get:
>
> facet_fields": { "color": [ "white", 19742,
>
> 19742 white items.
>
> However if I filter by white items:
>
>
> group=true&group.field=parent_sku&group.ngroups=true&group.truncate=true&facet=true&facet.field=color&fq=color:white,
>
>
> I'm getting 20543 items. The same happens when I use collapse query parser
> instead of grouping.
>
> I would expect those two numbers to be equal. So I assume the most
> relevant document of each group is chosen somehow differently when
> filtering is used. How can this be explained?
>
> Best regards,
> Andrii
>