Help on using stored filed in side a query

I have index1 and index2. Running below query against Index1 where i point to index2. In indexs those fields created with stored option. Please help on this query.

POST /Index1/_search
{
    "query": {
        "bool": {
            "filter": [
                {
			"terms" : {
			"PID" : {
			     "index" : "Index2",
				  "type" : "_doc",
				  "id" : "1123",
				  "path" : "field1",
				  "stored": true
				}
			}
		}
    ]
  }
 }
}

ERROR: :{"type":"x_content_parse_exception","reason":"[12:17] [terms_lookup] unknown field [stored]"}

That sounds a lot like a join, which Elasticsearch generally do not support.

What does the data in the two indices look like and how are you looking to merge them?

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