If you just do a faceted query without the filter, each facet will give you the number of results for that country and numResults will give you the total number of results across all countries. But once you apply one or more filters, numResults reflects onl the post-filtering documents.
-- Jack Krupansky On Wed, Apr 13, 2016 at 4:43 PM, Fundera Developer < funderadevelo...@outlook.com> wrote: > Hi all, > > we are developing a search engine in which all the possible results have > one or more countries associated. If, apart from writing the query, the > user selects a country, we use a filterquery to restrict the results to > those that match the query and are associated to that country. Nothing > spectacular so far :-D > > However, we would like to show the number of results that are returned by > the unfiltered query, since we already have the number of results > associated to each country as we are also faceting on that field. Is it > possible to have that number without executing the query twice? > > Thanks in advance! > >