Cross Cluster search || _index value filtering

Hi Team,

  While using cross cluster search we are not able to filter out the records on _index attribute. We are using ES version 6.8 FYI. Please find the below query:

GET index1,index2,cluster2:index3,cluster2:index4/_search
{
"size": 10,
"query": {
"bool": {
"should": [
{
"bool": {
"must": [
{
"query_string": {
"query": "S*",
"fields": [
"attribute1^1.0"
],
"type": "best_fields"
}
},
{
"query_string": {
"query": "7*",
"fields": [
"attribute2^1.0"
],
"type": "best_fields"
}
},
{
"query_string": {
"query": "8*",
"fields": [
"attribute3^1.0"
],
"type": "best_fields"
}
},
{
"query_string": {
"query": "2*",
"fields": [
"attribute4^1.0"
],
"type": "best_fields",
"default_operator": "or"
}
},
{
"query_string": {
"query": "cluster2:index3 OR cluster2:index4",
"fields": [
"_index^1.0"
]
}
}
]
}
}
]
}
}
}

if we remove _index filtering query, the query will produce result.

We are running queries without the cluster name for same cluster and below query is working fine. For example:
GET index1,index2,cluster2:index3/_search
{
"size": 10,
"query": {
"bool": {
"should": [
{
"bool": {
"must": [
{
"query_string": {
"query": "index1 OR index2",
"fields": [
"_index^1.0"
]
}
}
]
}
}
]
}
}
}

Can you please let me know why the first query is not working?

Thanks!
Deepak Bhatt

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.