I need to query 3000 data from ElasticSearch, and currently I am using multi_match for querying. Is there a way to match using an array of strings? Term is not usable as it only queries the exact value of the string.
Below is an example of an ideal request:
{
"size": 1,
"_source": ["_id"],
"query": {
"multi_match": {
"query": ["val1", "val2"],
"fields": [
"name",
"url"
]
}
}
}
EDIT:
Another use case would be like searching schools:
{
"size": 1,
"_source": ["_id"],
"query": {
"multi_match": {
"query": ["school name 1", "school name 2"],
"fields": [
"name"
]
}
}
}
Consider the spaces of each values to be the whole school name.