Can I get only those parts of array during a search which match the result?

I have document similar to below

POST /index1/test

The following search is executed and it returns the entire tag attribute. Can I only get the elements it matched i.e 1and 2 only ?

  GET /index1/test/_search
      "query": {
        "terms": {
          "tags": [

No, this is impossible.

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