lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cwhi <chris.whi...@gmail.com>
Subject Having an issue with pivot faceting
Date Tue, 07 Oct 2014 15:22:35 GMT
I'm having an issue getting pivot faceting working as expected.  I'm trying
to filter by a specific criteria, and then first facet by one of my document
attributes called item_generator, then facet those results into 2 sets each:
the first set is the count of documents satisfying that facet with
number_of_items_generated set to 0, the other set counting the documents
satisfying that facet with number_of_items_generated greater than 0.  Seems
simple enough, and it seems like pivot faceting with facet.interval.set
would be the solution.  However, I'm not getting the expected results.  Here
are my request and response:

Request:

http://localhost/solr/select/?facet=true&facet.sort=true&q=item_type:Food&facet.field=item_generator&f.number_of_items_generated.facet.interval.set=[0,0]&f.number_of_items_generated.facet.interval.set=[1,100]&rows=0&version=2.2&wt=json

Response:

{"responseHeader":{"status":0,"QTime":0,"params":{"f.number_of_items_generated.facet.interval.set":["[0,0]","[1,100]"],"facet":"true","facet.sort":"true","q”:"item_type:Food","facet.field”:"item_generator","wt":"json","version":"2.2","rows":"0"}},"response":{"numFound":743,"start":0,"docs":[]},"facet_counts":{"facet_queries":{},"facet_fields":{“item_generator":[“food-creator",387,”toy-creator",356]},"facet_dates":{},"facet_ranges":{}}}

I've set docValues="true" for number_of_items_generated in my schema.xml.
What am I doing wrong in my query?



--
View this message in context: http://lucene.472066.n3.nabble.com/Having-an-issue-with-pivot-faceting-tp4163158.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message