Reputation: 1
My question is: How could I realize two counts in just one SOLR query? I have tried something like this:
q=query&field:[* TO *],-field:[* TO *]&start=0&rows=0&facet=true&facet.missing=true
i.e. I am trying to count null records and not null records for the same field.
No error reported but no result retrieved.
Upvotes: 0
Views: 57
Reputation: 11023
This should give you both counts:
q=query&facet=true&facet.query=field:[* TO *]&facet.query=-field:[* TO *]&rows=0
Upvotes: 2