Solr – Getting facet counts without returning search results
Setting facet=true will enable faceting and setting rows=0 will prevent any results being returned. Conveniently the numFound will show you how many results were found.
Setting facet=true will enable faceting and setting rows=0 will prevent any results being returned. Conveniently the numFound will show you how many results were found.
By the looks of it, your tags is not nested. For this aggregation to work, you need it nested so that there is an association between an id and a name. Without nested the list of ids is just an array and the list of names is another array: “item”: { “properties”: { “meta”: { … Read more
Starting from version 1.0 of ElasticSearch, the new aggregations API allows grouping by multiple fields, using sub-aggregations. Suppose you want to group by fields field1, field2 and field3: { “aggs”: { “agg1”: { “terms”: { “field”: “field1” }, “aggs”: { “agg2”: { “terms”: { “field”: “field2” }, “aggs”: { “agg3”: { “terms”: { “field”: “field3” … Read more
Faceted search is well-explained here and Lucene faceted through an example. EXAMPLE: