Elasticsearch giving incorrect result when using "must_not" operator alongwith "must" operator

example

Query
GET /beta/user/_search?routing=1&q=_id:54e5dc4817cf03cbbbe490e5
{
"from":0,
"size":1,
"filter":{
"and":[
{
"query":{
"nested":{
"path":"event",
"query":{
"bool":{
"must":[
{
"match":{
"event.name":"e1"
}
},
{
"match":{
"event.count":"4"
}
}
]
}
}
}
}
},
{
"query":{
"nested":{
"path":"event",
"query":{
"bool":{
"must_not":{
"match":{
"event.name":"e2"
}
}
}
}
}
}
}
]
}
}

Any help will be appreciated

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ee8b1176-49ea-4a7c-921c-fca8f45c7af5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.