Terms Query Lookup with index on another cluster


(Alex Pang) #1

Running Elasticsearch 6.2.0.
I can query values in the remote lookup index just fine, but I can't seem to use it in terms query.
Ex.

GET RemoteCluster:lookup/_search
{
  "query": {
    "match_all": {}
  }
}


GET RemoteCluster:normal_index/_search
{
  "query": {
    "terms": {
      "myField": {
        "index": "RemoteCluster:lookup",
        "type": "_doc",
        "id": "myId",
        "path": "myPath"
      }
    }
  },
  "size": 10
}

Response:

{
  "error": {
    "root_cause": [
      {
        "type": "index_not_found_exception",
        "reason": "no such index",
        "resource.type": "index_expression",
        "resource.id": "RemoteCluster:lookup",
        "index_uuid": "_na_",
        "index": "RemoteCluster:lookup"
      }
    ],
    "type": "index_not_found_exception",
    "reason": "no such index",
    "resource.type": "index_expression",
    "resource.id": "RemoteCluster:lookup",
    "index_uuid": "_na_",
    "index": "RemoteCluster:lookup"
  },
  "status": 404
}

If I do the query directly on the cluster RemoteCluster it works fine.
Ex.

GET normal_index/_search
{
  "query": {
    "terms": {
      "myField": {
        "index": "lookup",
        "type": "_doc",
        "id": "myId",
        "path": "myPath"
      }
    }
  },
  "size": 10
}

Is this a bug with terms query lookup or just not possible?


(system) #2

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