How to run a query with the properties from a stored document?

(Tom) #1

Let's say we have a index with docs which contain the following fields: uid, gender and hobbies. How can I run a query to find similarities between 1 and the other users, without having to retrieve the user first and then run a new query with his hobbies? I also want to include a must query which contains the opposite gender.

I know about the more like this query, but AFAIK it is not possible to directly access the stored doc values.

Is this possible with painless?

(Mark Walkom) #2

This is what Graph is really good at, but there's no single query in ES that can do this.

(system) #3

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