Hi Team,
I need a query to get the data from multiple indexes. here is my question.
If we have two indexes like
- Index: my_index1
fields: sr_id, exp_date - Index: my_index2
fields: sr_id, s_name
GET /my_index1,my_index2/_search
{
"query": {
"bool": {
"should": [
{
"bool":{
"must":[
{"match":{
"sr_id.keyword": "10011"
}
}
]}},
{
"bool": {
"must": {
"match": {
"sr_id.keyword": "10099"
}
}
}
}
]
}
}
}
It is fetching unexpected data from another index of this two indexes. because of the same column name present in this indexes.
Is there any possibility to pass the index name in bool to get the proper data from expected index.