Hello,
I use two methods to get the information of groups, one is Result Grouping
and the other is Terms Facet.
Result grouping:
q=*:*&group=true&group.field=repPatSurname_s&rows=100

Terms Facet
{
  "query": "*:*",
  "limit":0,
  "facet": {
    "categories" : {
      "type": "terms",
      "field": "repPatSurname_s",
      "limit": 100
    }
  }
}
By using the same database, the Result Grouping finds 26 groups but Terms
Facet only finds 25 buckets (groups). Result Grouping creates the extra
group for those whose value of the field (repPatSurname_s) is null. Other
groups found by the two methods are identical.
As we know, Facet API can be used for multi-level grouping (Nested Facets).
For one level grouping, subtraction can solve the problem. However, if the
number of levels is more than 2, with a single query, I am not able to
get grouping details of a big group since the field of loads of documents
is null.
Is there any setting in Facet API I could change to get the 'field = null'
group?
Many thanks in advance.
Kind regards,
Zhiqing

Reply via email to