С момента обновления до ES 6.4 мои агрегаты возвращают пустые сегменты.Вот как выглядит агрегат:
"measurements": {
"terms": {
// This decides the number of buckets
"size": 20,
"field": "measurements.raw"
}
},
"part_type": {
"terms": {
"size": 20,
"field": "part_type.raw"
}
}
Раньше все работало идеально.Отображение для этих частей:
"parts": {
"properties": {
"measurements": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"part_type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
},
Каким-то образом ведра остаются пустыми. Массивы, и я не могу понять, почему.Теперь в запросе есть ошибка.
Пример возврата данных из запроса поиска:
{
"_index": "certificates",
"_type": "certificate",
"_id": "56a74f7c5dee788d0c3bc86f",
"_score": 1,
"_source": {
"certificate_number": "A10288",
"certificate_type": "3.1B",
"norm": "",
"material_quality": "904L",
"manufacturer": "BLABLA",
"bb_code": "xxx",
"attached_file": {
"originalname": "",
"filename": ""
},
"parts": [
{
"measurements": "Ø73.02x5.16",
"charge_number": "442665",
"probe_number": "",
"part_type": "ELBOW",
"comment": "",
"factory_code": "",
"_id": "56a74f7c5dee788d0c3bc870",
"mcl_order_number": [
{
"number": "43.9.069"
}
]
}
],
"created_by": {
"user_name": "System import"
},
"__v": 0
}
}
Я пытался переписать в соответствии с 6.4 документа, чтобы он выглядел какthis:
aggregations = {
"parts": {
"terms": {"field": "parts"},
"aggs": {
"measurements": {
"terms": {"field": "parts.measurements.raw"}
},
"part_type": {
"terms": {"field": "parts.part_type.raw"}
},
}
}
}
Возвращает следующее:
"aggregations": {
"parts": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": []
}
}