index="main" "recommended product" [ search index="main" "purchased product" | fields itemid | rename itemid as search | format ]
So Subquery returns a list of itemid like so... ("abc" OR "xyz" OR "mno")
Main query will return 5 events, consisting of "abc"(found in 2 events) and "xyz"(found in 3 events). "mno" does not exist in main query data set.
Is there a way I can get a list of subquery keywords that were found in main query?
EDIT: Clarifying the ask with an example -
My main search gives me a list of "recommended products"
My subsearch gives me a list of "purchased products"
I would like to find out how many products were purchased because they were recommended.
... View more