I have these documents:
{"title": "aa","cast": ["a","b","c","a"]}
{"title": "bb","cast": ["a","b","c","b"]}
{"title": "cc","cast": ["a","b","c","c"]}
I get the result using the faceting.
facets": {
"cast_result": {
"_type": "terms",
"missing": 0,
"total": 9,
"other": 0,
"terms": [
{
"term": "c",
"count": 3
},
{
"term": "b",
"count": 3
},
{
"term": "a",
"count": 3
}
]
}
}
}
but I want the result that the count of "a" is four,Because the frequency of "a" is four in the real document."b" and "c" also like the "a".