lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alain Rogister <>
Subject Re: inconsistent results when faceting on multivalued field
Date Fri, 21 Oct 2011 07:55:11 GMT

Not exactly. Here is the search I do, in more details (different field name,
but same issue).

I want to get a count for a specific value of the sou_codeMetier field,
which is multivalued. I expressed this by including a fq clause :


The response (excerpt only):

<lst name="facet_fields">
<lst name="sou_codeMetier">
<int name="1213206">1281</int>
<int name="1212104">476</int>
<int name="121320603">285</int>
<int name="1213101">260</int>
<int name="121320602">208</int>
<int name="121320605">171</int>
<int name="1212201">152</int>

As you see, I get back both the expected results and extra results I would
expect to be filtered out by the fq clause.

I can eliminate the extra results with a
'f.sou_codeMetier.facet.prefix=1213206' clause.

But I wonder if Solr's behavior is correct and how the fq filtering works

If I replace the facet.field clause with a facet.query clause, like this:

/select/?q=*:*&facet=true&facet.query=sou_codeMetier:[1213206 TO

The results contain a single item:

<lst name="facet_queries">
<int name="sou_codeMetier:[1213206 TO 1213206]">1281</int>

The 'fq=sou_codeMetier:1213206' clause isn't necessary here and does not
affect the results.



On Fri, Oct 21, 2011 at 9:18 AM, pravesh <> wrote:

> Could u clarify on below:
> >>When I make a search on facet.qua_code=1234567 ??
> Are u trying to say, when u fire a fresh search for a facet item, like;
> q=qua_code:1234567??
> This this would fetch for documents where qua_code fields contains either
> the terms 1234567 OR both terms (1234567 & 9384738.....and others terms).
> This would be since its a multivalued field and hence if you see the facet,
> then its shown for both the terms.
> >>If I reword the query as 'facet.query=qua_code:1234567 TO 1234567', I
> only
> get the expected counts
> You will get facet for documents which have term 1234567 only (facet.query
> would apply to the facets,so as to which facet to be picked/shown)
> Regds
> Pravesh
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message