I am running:
{
"size": 0,
"track_total_hits": true,
"query": {
"bool": {
"must": [
{"match": {"prgx_email_join": {"query": "attachmentChild" } } }
]
}
},
"aggs": {
"attachment_count" : {
"cardinality": {
"script": {
"source": "doc['_id'].value.substring(48)"
}
}
}
}
}
And the results are:
{
"took": 20433,
"timed_out": false,
"_shards": {
"total": 6,
"successful": 6,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 34924205,
"relation": "eq"
},
"max_score": null,
"hits": []
},
"aggregations": {
"attachment_count": {
"value": 35113251
}
}
}
How does the attachment_count exceed the hits.total.value?