Я не могу понять причину, по которой применение динамического отображения влияет на фильтрацию следующим образом.
это отображение:
"mappings": {
"elastic_agent": {
"dynamic": "false",
"properties": {
"locations": {
"type": "integer"
},
"property_count": {
"properties": {
"0": {
"type": "object",
"dynamic": "false"
},
"1": {
"type": "object",
"dynamic": "false"
}
}
}
}
}
}
это запрос, который я делаю:
{
"_source": [
"id"
],
"query": {
"bool": {
"must": [
{
"term": {
"locations": 55744
}
}
]
}
},
"size": 1
}
и вот результат:
"hits": {
"total": 454,
"max_score": 1.0,
"hits": [
{
"_index": "elastic_agents",
"_type": "elastic_agent",
"_id": "9684",
"_score": 1.0,
"_source": {
"id": 9684
}
}
]
}
НО, если я введу динамическое отображение в другом поле (!) , чем то, которое я запрашиваюПример:
"mappings": {
"elastic_agent": {
"dynamic": "false",
"properties": {
"locations": {
"type": "integer"
},
"property_count": {
"properties": {
"0": {
"type": "object",
"dynamic": "true"
},
"1": {
"type": "object",
"dynamic": "true"
}
}
}
}
}
}
нет результатов
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}
Не могли бы вы помочь мне понять, что происходит?
Версия Elasticsearch - 6,8
Спасибо