Find user on multiple condition after aggregation result

I want to find user who have user_action searched-for-cake and got-cake.

sample index is as follow.

{
{
user_id:"ad97b3fe-0d55-4133-9367-1",
user_action:"searched-for-cake"
},

{
	user_id:"ad97b3fe-0d55-4133-9367-1",
	action:"got-cake"		
},

{
	user_id:"ad97b3fe-0d55-4133-9367-3",
	action:"need-help"		
},

{
	user_id:"ad97b3fe-0d55-4133-9367-4",
	user_action:"searched-for-cake"		
},

{
	user_id:"ad97b3fe-0d55-4133-9367-4",
	action:"got-cake"		
},

{
	user_id:"ad97b3fe-0d55-4133-9367-3",
	action:"got-cake"		
}

}

Take a look at the nested datatype, the nested query and also the nested aggregation

hope this helps!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.