Facet search: how to count the facet values

Given a document has field: Root.General.User, it has either Empty value or an username.
I want to count in the returned documents what are the values of these fields, and count of each value.
But LIST_DOCUMENTS only returns the values in the found result, not count of them.
Here is the facets request:
“facets”: [
{
“id”: “filter_user”,
“type”: “term”,
“field”: “Root.General.User”,
“facets”: [
{
“id”: “count_of_user”,
“type”: “count”,
“field”: “Root.General.User”
}
],
“offset”: 0,
“limit”: 10
}
]

And response:
“facets”: {
“filter_user”: {
“buckets”: [
{
“val”: “import”
}
],
“offset”: 0,
“limit”: 10,
“fullSize”: 1
}
}

Please check my full request and response. I expect to have count_of_user = 2 for given search results
Thanks
Facet search_request.txt (22.7 KB)

Hi @trung-async-stone ,

There is a bug in DS 35.0.0 (A12S-3404) and this behavior will be fixed in 35.0.2 which will be released this week.