Re: Retrieve 6 products for top 3 users and each one has 2 with highest matching score

2014-05-09 Thread Yao
In multi search, you mean use 5, 7, 20 (user5, user7, and user20) to indicate user id for routing and then pick top 2 products for each of them? I use Play Framework and Scala, do you know how to embed the facet term results (user id) into the multi search? (As far as I know in ES Java APIs, it

Re: Retrieve 6 products for top 3 users and each one has 2 with highest matching score

2014-05-08 Thread Yao Li
What about nested or parent/child query? How to achieve? On Thursday, May 8, 2014 4:45:36 PM UTC-7, Yao Li wrote: I have a collection of products which belong to few users, like [ { id: 1, user_id: 1, description: blabla..., ... }, { id: 2, user_id: 2, description: blabla