# Query object at specific occurrence/index of nested type

**URL:** <https://discuss.elastic.co/t/query-object-at-specific-occurrence-index-of-nested-type/15589>\
**Category:** Elasticsearch\
**Created:** [February 4, 2014, 11:14am UTC](https://discuss.elastic.co/t/query-object-at-specific-occurrence-index-of-nested-type/15589 "2014-02-04T11:14:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Lawler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_lawler/32/128870_2.png) [@Michael\_Lawler](https://discuss.elastic.co/u/Michael_Lawler)\
**Post date:** [February 4, 2014, 11:14am UTC](https://discuss.elastic.co/t/query-object-at-specific-occurrence-index-of-nested-type/15589/1 "2014-02-04T11:14:06Z")

</div>

Hi,

When working with a nested type which is a list of objects, is it possible  
to constrain the scope of the query to an object ay a specific index?

i.e. if 'foo' is a nested type, can I search only for foo[0] rather than  
foo[1] within the parent document.

i.e. I want the path of my nested query to be 'foo[0]' not 'foo'

Michael

--  
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/b262dcff-432e-4e1e-a1af-a97ddae6e751%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b262dcff-432e-4e1e-a1af-a97ddae6e751%40googlegroups.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, 1:52am UTC](https://discuss.elastic.co/t/query-object-at-specific-occurrence-index-of-nested-type/15589/2 "2017-07-06T01:52:47Z")

</div>

Closed on July 6, 2017, 1:52am UTC


