Assistance with parent/child relationships

I'm struggling with this behavior and am uncertain of how to proceed
with debugging. I've read through all the docs I can find, but still
am not having any luck.

I am building a knowledge base search index, and a requirement is to
be able to match posts with answers. This seems very obviously best
suited as a parent/child relationship. A KB Post has many responses,
which are the children. This is very similar to a blog and comment
model. To be more similar to the documentation examples, I've just
narrowed the example down to a post and tags (though my real world
usage will be post -> answers).

I've attempted to follow the documentation and have also setup the
mappings. It seems they are correct in that the _parent field is
reporting correctly.

I've put everything in this gist that I think is needed to help me
trouble-shoot: https://gist.github.com/2758363 but I may be missing
something key.

The search is against only the single index (kb-post), the final file
in the gist are the mappings in that index. It clearly says that kb-
post-tag has a _parent of kb-post, and the type kb-post has every
property defined as I expect it.

Thanks for any help!

-Jay

I thought that maybe the documents being inserted were after, or I was
missing a re-index.

I've attempted this (reindexed with a confirmed correct mapping) but still
having no luck on getting the parent/child relationship to work.

Does anybody have any debugging tips or any additional information I can
look at?

Thanks,
-Jay

On Tuesday, May 22, 2012 7:51:57 AM UTC-7, Jay Shirley wrote:

I'm struggling with this behavior and am uncertain of how to proceed
with debugging. I've read through all the docs I can find, but still
am not having any luck.

I am building a knowledge base search index, and a requirement is to
be able to match posts with answers. This seems very obviously best
suited as a parent/child relationship. A KB Post has many responses,
which are the children. This is very similar to a blog and comment
model. To be more similar to the documentation examples, I've just
narrowed the example down to a post and tags (though my real world
usage will be post -> answers).

I've attempted to follow the documentation and have also setup the
mappings. It seems they are correct in that the _parent field is
reporting correctly.

I've put everything in this gist that I think is needed to help me
trouble-shoot: Index Mapping · GitHub but I may be missing
something key.

The search is against only the single index (kb-post), the final file
in the gist are the mappings in that index. It clearly says that kb-
post-tag has a _parent of kb-post, and the type kb-post has every
property defined as I expect it.

Thanks for any help!

-Jay

Can you post a full curl recreation? A curl that creates the index with the
relevant mappings, index some sample data, and then sends the failing
search request.

On Thu, May 24, 2012 at 12:51 AM, Jay Shirley jshirley@tdp.me wrote:

I thought that maybe the documents being inserted were after, or I was
missing a re-index.

I've attempted this (reindexed with a confirmed correct mapping) but still
having no luck on getting the parent/child relationship to work.

Does anybody have any debugging tips or any additional information I can
look at?

Thanks,
-Jay

On Tuesday, May 22, 2012 7:51:57 AM UTC-7, Jay Shirley wrote:

I'm struggling with this behavior and am uncertain of how to proceed
with debugging. I've read through all the docs I can find, but still
am not having any luck.

I am building a knowledge base search index, and a requirement is to
be able to match posts with answers. This seems very obviously best
suited as a parent/child relationship. A KB Post has many responses,
which are the children. This is very similar to a blog and comment
model. To be more similar to the documentation examples, I've just
narrowed the example down to a post and tags (though my real world
usage will be post -> answers).

I've attempted to follow the documentation and have also setup the
mappings. It seems they are correct in that the _parent field is
reporting correctly.

I've put everything in this gist that I think is needed to help me
trouble-shoot: https://gist.github.com/**2758363https://gist.github.com/2758363but I may be missing
something key.

The search is against only the single index (kb-post), the final file
in the gist are the mappings in that index. It clearly says that kb-
post-tag has a _parent of kb-post, and the type kb-post has every
property defined as I expect it.

Thanks for any help!

-Jay

I would love to, however when I went back into es-head to start it's now
working.

I think that perhaps my previous re-index I wasn't waiting long enough? I
was reindexing and then immediately re-querying.

Perhaps it was something I was doing wrong.

What I was trying previously was to dynamically insert data and create the
types, then I apply the mapping with the _parent fields from what was
inserted. I then would reindex.

I think now I have the index and mapping in there, so the new data seems to
be available to query.

Is my understanding correct? I don't want to spend a lot more time
researching it if that sounds plausible.

On Fri, May 25, 2012 at 1:44 PM, Shay Banon kimchy@gmail.com wrote:

Can you post a full curl recreation? A curl that creates the index with
the relevant mappings, index some sample data, and then sends the failing
search request.

On Thu, May 24, 2012 at 12:51 AM, Jay Shirley jshirley@tdp.me wrote:

I thought that maybe the documents being inserted were after, or I was
missing a re-index.

I've attempted this (reindexed with a confirmed correct mapping) but
still having no luck on getting the parent/child relationship to work.

Does anybody have any debugging tips or any additional information I can
look at?

Thanks,
-Jay

On Tuesday, May 22, 2012 7:51:57 AM UTC-7, Jay Shirley wrote:

I'm struggling with this behavior and am uncertain of how to proceed
with debugging. I've read through all the docs I can find, but still
am not having any luck.

I am building a knowledge base search index, and a requirement is to
be able to match posts with answers. This seems very obviously best
suited as a parent/child relationship. A KB Post has many responses,
which are the children. This is very similar to a blog and comment
model. To be more similar to the documentation examples, I've just
narrowed the example down to a post and tags (though my real world
usage will be post -> answers).

I've attempted to follow the documentation and have also setup the
mappings. It seems they are correct in that the _parent field is
reporting correctly.

I've put everything in this gist that I think is needed to help me
trouble-shoot: https://gist.github.com/**2758363https://gist.github.com/2758363but I may be missing
something key.

The search is against only the single index (kb-post), the final file
in the gist are the mappings in that index. It clearly says that kb-
post-tag has a _parent of kb-post, and the type kb-post has every
property defined as I expect it.

Thanks for any help!

-Jay