I want to perform a multiple indice search with a term search for all indices but I want to add filters for a particular indice. For example a term query like:
http://0.0.0.0:9200/index_a,index_b/type1,type2,typ3/_search
{
"_source": [
"all my sources"
],
"query": {
"bool": {
"filter": [
[
{
"query_string": {
"fields": [
"my fields"
],
"fuzziness": 0,
"query": "My Search Term For All Indices"
}
}
]
]
}
},
"sort": [....],
"size": 150,
"aggs": {...}
}
I want to add the following filter query to only be applied to only index_b:
"query": {
"bool": {
"filter": [
[
{
"query_string": {
"default_field": "field_1",
"query": "Some OR bool"
}
},
{
"query_string": {
"default_field": "field_2",
"query": "Some OR bool"
}
},
{
"query_string": {
"default_field": "field_3",
"query": "A"
}
},
{
"query_string": {
"default_field": "field_4",
"query": "Some OR bool"
}
},
{
"query_string": {
"default_field": "field_5",
"query": "Blah"
}
}
]
]
}
}
I don't know how to create the query that I am looking for an would really appreciate any help