0
votes

We're running Apache Solr v3.1 and SolrJ is our client.

We're passing multiple Arbitrary Faceting Query (facet.query) to get the number of matching documents (the facet count) evaluated over the search results in a single Solr query. My use case demands the actual matching facet results/documents/fields also along with facet count.

My question is, is it possible to get facet query matching results along with facet count in a single Solr query call?

1
If only you tried :-) The documents are returned in docs and the facets are returned in faceting (alongside the docs). Do extract the HTTP calls SolrJ makes and run them in your browser.Jesvin Jose
@aitchnyu: I think you've not understood my question. I knew documents are returned in docs, but my question here is I want to get facet count's results as well in single Solr query call. Hope I made this clear.Gnanam

1 Answers

2
votes

There is no support to get the facet rows count in solr 3.1 to my knowledge. The issue you are looking for exists as a feature request in Solr's JIRA:

https://issues.apache.org/jira/browse/SOLR-2242

There is a patch available, even specifically for Solr 3.1, but the issue still remains unresolved / uncommitted in 4.0. Maybe you could apply the patch yourself and see how it works out.