Есть "таблица" в Elasticsearch , которая имеют вид:
Тепер делаю запрос:
{
"size": 0,
"aggregations": {
"sport": {
"terms": {
"field": "prices.pharmacy.name"
}
}
}
}
и получаю Ответ:
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 30,
"successful": 30,
"failed": 0
},
"hits": {
"total": 1999,
"max_score": 0,
"hits": []
},
"aggregations": {
"sport": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "docmorris",
"doc_count": 1000
},
{
"key": "apotheke.com",
"doc_count": 999
},
{
"key": "shop",
"doc_count": 999
}
]
}
}
}
Как сделать так чтобы shop и online.com в одной "строке" было?
"aggregations": {
"sport": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "docmorris",
"doc_count": 1000
},
{
"key": "shop-apotheke.com",
"doc_count": 999
},
]
}