Reputation: 3725
I am new to solr,am using pysolr, I have a very basic question.
How can I add a facet to the pysolr query?
my solr query is: ip:8983/solr....q=...&facet=on&facet.field=xyz
its working in browser as I wish.
I want to know how can I implement it in my following code,
what the syntax to add facet in pysolr(facet=on&facet.field=xyz )
**
solrquery = "(.................. )"
solr.search([solrquery],)
**
Upvotes: 2
Views: 1594
Reputation: 3725
Use
solrquery = "(.................. )"
solr.search([solrquery],facet = 'on' ,** {'facet.field' : ['fieldname']})
Upvotes: 3