How to query document to return parent and child result

Hi All,

I have created some parent and child documents :

curl -XPUT 'http://localhost:9200/twitter/author/1 -d'
curl -XPUT 'http://localhost:9200/twitter/author/2 -d'

curl -XPUT 'http://localhost:9200/twitter/tweet/1?parent=1 -d'
curl -XPUT 'http://localhost:9200/twitter/tweet/2?parent=2 -d'

with the mapping as well. However there is a case whereby i need to query
the parent and child with the result return with both parent and child
information. I would like to know could i
achieve that in a single query or i need to do 2 query each for parent and
child.

Thanks.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Did you get an answer to this? I also have a similar requirement.

I want to query such that Parent should derive its relevance from both itself and all Child documents and I want to show parent and child items in search result.

Actually I found this thread now which is helpful on this-