I have document similar to below
POST /index1/test
{
"user":"u1",
"tags":[1,2,3,4,5,6,7,8]
}
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": [
1,
2
]
}
}
}