# 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?

**URL:** https://discuss.elastic.co/t/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/22290
**Category:** Elasticsearch
**Created:** [February 20, 2015, 12:56pm UTC](https://discuss.elastic.co/t/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/22290 "2015-02-20T12:56:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sandeep\_kaushal\_verm](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sandeep\_kaushal\_verm](https://discuss.elastic.co/u/sandeep_kaushal_verm)
#### Post date: [February 20, 2015, 12:56pm UTC](https://discuss.elastic.co/t/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/22290/1 "2015-02-20T12:56:48Z")

</div>

Below is Mapping of type user with nested event  
{  
"beta": {  
"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"  
},  
"name": {  
"type": "string",  
"analyzer": "string\_lowercase"  
},  
"last\_date": {  
"type": "date",  
"format": "dateOptionalTime"  
}  
}  
}  
}  
}  
}  
}  
}Enter code here...

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/32f64c24-779b-40f7-ae0f-3226bc3573a8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32f64c24-779b-40f7-ae0f-3226bc3573a8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 12:31am UTC](https://discuss.elastic.co/t/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/22290/2 "2017-07-06T00:31:14Z")

</div>


