Edit New issue Is this a right way to find in nested type that a user has done event e1 and has not done event e2?

Below is Mapping of type user with nested event
{
"jal": {
"mappings": {
"user": {
"dynamic_templates": [
{
"string_template": {
"mapping": {
"type": "string",
"index": "analyzed",
"analyzer": "string_lowercase"
},
"match": "*",
"match_mapping_type": "string"
}
}
],
"_routing": {
"required": true,
"path": "_shardId"
},
"properties": {
"event": {
"type": "nested",
"properties": {
"_date": {
"type": "date",
"format": "dateOptionalTime"
},
"count": {
"type": "long"
},
"first_date": {
"type": "date",
"format": "dateOptionalTime"
},
"key": {
"type": "string",
"analyzer": "string_lowercase"
},
"last_date": {
"type": "date",
"format": "dateOptionalTime"
},
"name": {
"type": "long"
}
}
}
}
}
}
}
}

--
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/9858bc33-5a05-4f54-97db-248c8b7922bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.