# Issue with nested query in Junits

**URL:** <https://discuss.elastic.co/t/issue-with-nested-query-in-junits/12568>\
**Category:** Elasticsearch\
**Created:** [June 27, 2013, 5:19pm UTC](https://discuss.elastic.co/t/issue-with-nested-query-in-junits/12568 "2013-06-27T17:19:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shgeorge](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@shgeorge](https://discuss.elastic.co/u/shgeorge)\
**Post date:** [June 27, 2013, 5:19pm UTC](https://discuss.elastic.co/t/issue-with-nested-query-in-junits/12568/1 "2013-06-27T17:19:12Z")

</div>

Hi ES team  
I have a nested query working fine on the ES cluster. I have the  
mappings with type "nested"  
But when I try to write Junits with the same query using  
EsSetup(com.github.tlrx.elasticsearch.test.EsSetup) and the same mapping  
that I used on the ES cluster, I get the below exception.

Caused by: org.elasticsearch.index.query.QueryParsingException: [storeitem]  
[nested] failed to find nested object under path [x.y.z] where

z is mapped as a nested type.

The test jar is elasticsearch-test-0.0.8.jar)

Appreciate any help.

Thanks

Sheeba

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:29am UTC](https://discuss.elastic.co/t/issue-with-nested-query-in-junits/12568/2 "2017-07-06T02:29:11Z")

</div>


