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.berezhyns...@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
>

Reply via email to