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 Kissue Kissue <ki...@gmail.com> on 2012/04/17 20:22:16 UTC

Problem with faceting on a boolean field

Hi,

I am faceting on a boolean field called "usedItem". There are a total of
607601 items in the index and they all have value for "usedItem" set to
false.

However when i do a search for *:* and faceting on "usedItem", the num
found is set correctly to 607601 but i get the facet result below:

lst name="usedItem"><int name="false">17971</int></lst>

I was expecting the facet count and the num found to match in this instance
since usedItem is false for all documents in the index.

The field definition uses the default solr boolean type as shown below:

<field name="usedItem" type="boolean" indexed="true" stored="true" />

I am using solr 3.5. Any pointers to what could be wrong would be greatly
appreciated.

Thanks.

Re: Problem with faceting on a boolean field

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Apr 17, 2012 at 2:22 PM, Kissue Kissue <ki...@gmail.com> wrote:
> Hi,
>
> I am faceting on a boolean field called "usedItem". There are a total of
> 607601 items in the index and they all have value for "usedItem" set to
> false.
>
> However when i do a search for *:* and faceting on "usedItem", the num
> found is set correctly to 607601 but i get the facet result below:
>
> lst name="usedItem"><int name="false">17971</int></lst>

You can verify by changing the query from *:* to usedItem:false  (or
adding an additional fq to that effect).

-Yonik
lucenerevolution.com - Lucene/Solr Open Source Search Conference.
Boston May 7-10