How to get Unique Parent record and its last child document?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to get Unique Parent record and its last child document?

sathish.infotech
This post has NOT been accepted by the mailing list yet.
Hi,

I am trying to query elasticsearch in such a way the return the latest child document or any one child document for each unique parent document. I am indexing UserId as Parent document and User metadata information to child document. Each UserId will have multiple metadata info indexed as Child document. So I need to query to return top 1 child document for each UserId in Parent document. Can anyone help me on how to achieve this in Elasticsearch. I am using ES 5.1.

Thanks,
Sathish DV
Loading...