# Child object id search

**URL:** <https://discuss.elastic.co/t/child-object-id-search/9643>\
**Category:** Elasticsearch\
**Created:** [November 9, 2012, 8:32am UTC](https://discuss.elastic.co/t/child-object-id-search/9643 "2012-11-09T08:32:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Gulliksen](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Michael\_Gulliksen](https://discuss.elastic.co/u/Michael_Gulliksen)\
**Post date:** [November 9, 2012, 8:32am UTC](https://discuss.elastic.co/t/child-object-id-search/9643/1 "2012-11-09T08:32:49Z")

</div>

I have this object:

document  
{  
Title:string,  
Id:integer  
Tags:List  
}

Tag  
{  
Id:integer,  
Value:string,  
Type:string  
}

When searching for  
document.tags.value I succeed, but when searching for  
document.tags.id, I get no results back.  
Why is this?

--

---

<div class="post-metadata">

**Author:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [November 9, 2012, 8:21pm UTC](https://discuss.elastic.co/t/child-object-id-search/9643/2 "2012-11-09T20:21:50Z")

</div>

Hello Michael,

That's weird, because for me it works on an "autodetected mapping":

> <https://gist.github.com/radu-gheorghe/4047982>

So I guess what I understood is not what you have. If that's true, can  
you come up with some more details, like:

- ES version
- mapping
- sample doc

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Fri, Nov 9, 2012 at 10:32 AM, Michael Gulliksen  
[michael.gulliksen@gmail.com](mailto:michael.gulliksen@gmail.com) wrote:

> I have this object:
> 
> document  
> {  
> Title:string,  
> Id:integer  
> Tags:List  
> }
> 
> Tag  
> {  
> Id:integer,  
> Value:string,  
> Type:string  
> }
> 
> When searching for  
> document.tags.value I succeed, but when searching for  
> document.tags.id, I get no results back.  
> Why is this?
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Michael\_Gulliksen](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Michael\_Gulliksen](https://discuss.elastic.co/u/Michael_Gulliksen)\
**Post date:** [November 12, 2012, 10:34am UTC](https://discuss.elastic.co/t/child-object-id-search/9643/3 "2012-11-12T10:34:13Z")

</div>

Hi Radu,

I am using c# NEST for indexing and elasticsearch-head plugin for web  
interface / search, ES 0.19, default mapping. It looks like I/there is a  
problem related to sub objects and similar property names. E.g. document.id  
and tag.id, when changeing tag.id to tag.tagid it works.

/Michael

On Friday, November 9, 2012 9:21:55 PM UTC+1, Radu Gheorghe wrote:

> Hello Michael,
> 
> That's weird, because for me it works on an "autodetected mapping":  
> [child object ID search · GitHub](https://gist.github.com/4047982)
> 
> So I guess what I understood is not what you have. If that's true, can  
> you come up with some more details, like:
> 
> - ES version
> - mapping
> - sample doc
> 
> ## Best regards, Radu
> 
> [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> On Fri, Nov 9, 2012 at 10:32 AM, Michael Gulliksen  
> \<[michael....@gmail.com](mailto:michael....@gmail.com) \<javascript:\>\> wrote:
> 
> > I have this object:
> > 
> > document  
> > {  
> > Title:string,  
> > Id:integer  
> > Tags:List  
> > }
> > 
> > Tag  
> > {  
> > Id:integer,  
> > Value:string,  
> > Type:string  
> > }
> > 
> > When searching for  
> > document.tags.value I succeed, but when searching for  
> > document.tags.id, I get no results back.  
> > Why is this?
> > 
> > --

--

---

<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, 3:04am UTC](https://discuss.elastic.co/t/child-object-id-search/9643/4 "2017-07-06T03:04:48Z")

</div>


