Hi,
I search "foo" in a nested obj. with:
curl -XGET 'http://localhost:9200/horyou_fr/member/_search' -d '{
"query": {
"nested": {
"path": "contents",
"query": {
"bool" : {
"must" : [
{
"text" : {"contents.content" : "foo"}
}
]
}
}
}
}
}'
The response is:
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 2.098612,
"hits": [
{
"_index": "horyou_fr",
"_type": "member",
"_id": "member-1",
"_score": 2.098612,
"_source": {
"slug": "jacque-selere",
"firstname": "Jacque",
"lastname": "Selere",
"__description": null,
"stars": 0,
"picture":
"5a9a8f24d0131d2ef1f3a1eb75d82a4a/:format/default.jpg",
"contents": [
{
"content": "foo"
},
{
"content": "bar"
}
]
}
}
]
}
}
Is it possible to remove "content": "bar" (which doesn't match my query)
from the response?
Thanks!
--