Correlating data across indices

I know I will probably need the _msearch API to do this but am having trouble accomplishing my goal.

I have two indices (Index1 and Index2) that each have a term I am trying to correlate. Basically, I want to find documents where Index1:TermA = Index2:TermB.

I have tried using the following:

 GET /Index1,Index2/_search
{
  "query": {
    "bool": {
      "should": [
        {
          "term": {
            "TermA.keyword": "*"
          }
        },
        {
          "term": {
            "TermB.keyword": "*"
          }
        }
      ]
    }
  }
}

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