Let’s say I have this query that applies over multiple indexes:
POST index1,index2/_search
{
"query": {
"bool" : {
"filter" : [
{
"term" : {
"company" : {
"value" : "MT-COMPANY-FRANCE-ORGUNITID",
"boost" : 1.0
}
}
}
],
"should" : [
{
"match_phrase_prefix" : {
"name" : {
"query" : "es"
}
}
},
{
"match_phrase_prefix" : {
"synonyms" : {
"query" : "es"
}
}
}
],
"adjust_pure_negative" : true,
"minimum_should_match" : "1",
"boost" : 1.0
}
}
}
Now I wish to add 2 things:
- specify the 1st should query for index1 and and 2nd should query for index2.
Even if I can’t do this, query will still work so it’s not that trouble - specify the index for the filter term.
In this case, this is very important, otherwise query won’t work for the other index
Can I do that ?