I have one index called user_info, under the index there are two types called user and events. Right now I need to query out 200 users and each user with 10 events. So I did the query as following(sodu script): for searching user:
{size:200,"match:{"user_address":"CA Sf"}}
And then I issued 200 quires to Event type: for search event:
{size:10,"term":{"userid":"id1"}}
{size:10,"term":{"userid":"id2"}}
....
{size:10,"term":{"userid":"id200"}}
Any idea please to optimize the above queries, thanks!