Answer the question
In order to leave comments, you need to log in
ElasticSearch 7.17, how to properly search a list of UUIDs?
I create an index (id is uuid):
...
"mappings": {
"_field_names": {
"enabled": true
},
"properties": {
"id": {"type": "keyword"},
...
}
}
...
{
"_source": ["id", "city_code", "country_code", "name_en", "name_ru", "name_es", "name_fr", "name_it", "name_de", "name_uk"],
"query": {
"terms": {"id" : ["31bbcedb-3ca4-4de6-91b1-62683ec79a4f", "cfd24807-c758-444c-b38c-0a06dbccfe02"]}
}
}
{
"_source": ["id", "city_code", "country_code", "name_en", "name_ru", "name_es", "name_fr", "name_it", "name_de", "name_uk"],
"query": {
"terms": {"id" : ["31bbcedb", "cfd24807"]}
}
}
Answer the question
In order to leave comments, you need to log in
Everything turned out to be simple
"terms": {"id.keyword" : ["31bbcedb-3ca4-4de6-91b1-62683ec79a4f", "cfd24807-c758-444c-b38c-0a06dbccfe02"]}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question