# Dynamic complex fields filter

**URL:** <https://discuss.elastic.co/t/dynamic-complex-fields-filter/21834>\
**Category:** Elasticsearch\
**Created:** [January 26, 2015, 4:45pm UTC](https://discuss.elastic.co/t/dynamic-complex-fields-filter/21834 "2015-01-26T16:45:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilija\_Subasic](https://avatars.discourse-cdn.com/v4/letter/i/ee7513/32.png) [@Ilija\_Subasic](https://discuss.elastic.co/u/Ilija_Subasic)\
**Post date:** [January 26, 2015, 4:45pm UTC](https://discuss.elastic.co/t/dynamic-complex-fields-filter/21834/1 "2015-01-26T16:45:44Z")

</div>

Hi,  
I am using version 1.3.7 and have problems with dynamic mappings of  
complex fields and filters. It seems this is not supported as I cannot  
obtain the results, but get an empty set response each time.  
I have found this link suggesting the  
same [http://elasticsearch-users.115913.n3.nabble.com/unmapped-nested-types-in-queries-td4067651.html](http://elasticsearch-users.115913.n3.nabble.com/unmapped-nested-types-in-queries-td4067651.html).  
Is there a fix or a workaround this, apart from creating a mapping or  
flattening  
the dynamic mapping.  
Thanks,  
Ilija

My dynamic mapping adds a structure like this:

{ "meta":  
{ "dates":  
{"start":long},  
{"end":long}  
}  
}

when I try to query using something like this:

{  
"size": 2,  
"query": {  
"filtered": {  
"query": {  
"match\_all": {}  
},  
"filter": {  
"bool": {  
"must": [  
{  
"range": {  
"meta.dates.start": {  
"from": 1417787100  
}  
}  
}  
]  
}  
}  
}  
}  
}

I get nothing back, and I can confirm by looking at the data that there  
should be results.

--  
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/7fd87068-1b97-4a2d-b6c8-e9f850c3c0bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7fd87068-1b97-4a2d-b6c8-e9f850c3c0bc%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:36am UTC](https://discuss.elastic.co/t/dynamic-complex-fields-filter/21834/2 "2017-07-06T00:36:38Z")

</div>


