Hello,
is it possible to use intervals query with an OR operator logic without using a list of match queries with any_of rule?
I want to use the intervals positional score for a set of terms, but without the need to loop through each term to construct the query, as I need to pass it as a string parameter in my constructor.
Example:
{
"intervals": {
"title": {
"any_of": { #or
"intervals": [
{"match": {"query": "smartphone samsung"}},
{"match": {"query": "smartphone xiaomi"}}
]
}
}
}
}
This query gives me the result I want, but I need to pass the terms as one single string query, like
{
"intervals": {
"title": {
"match": {
"ordered": false,
"query": "smartphone samsung xiaomi",
"operator": "or" #<<<<<
}
}
}
}
Thanks in advance