Hello all,

I'm new to this list, so if I don't use it correctly, please say so.

I have a question about facetting on multivalued fields. I have indexed some
data from a product feed. One of my fields, the category field, is a
multivalued field.
This field contains multiple categories related to the product. For example
when I index a product feed composed of fashion items the category field can
be filled with
the values "women men boys" when this piece of clothing is available for
women, men and boys.

Like I said I indexed the category as a multivalued field. Now I want to
facet on it. Facetation works, however, not as expected.
When I query Solr with the following URL
q=*:*&facet=true&facet.field=category&fq=category:women, I receive the
following response

<int name="women">71</int>
<int name="men">6</int>
<int name="babies">1</int>
<int name="baby">0</int>
<int name="boys">0</int>
<int name="girls">0</int>

It looks like Solr returns every document where 'women' is part of the
multivalued category field, but also returns the facets(count) for all
keywords that where indexed as part of the multivalued field, along with
'Women'. In this example I got back documents which had the category field
indexed like  "women men" , "women babies" and "women babies men".

What is worse, since it also calculates the facets for babies and men, when
I put another facet.field in the query (like brand), the response also
returns brands for categories men and babies.

Is this as designed? Is there a way to let Solr *only* return the documents
which have 'women' in their category field?


Thanks a lot for the help!

Regards,
Dennis

Reply via email to