Hi gang, my first time posting so hopefully I am in the right place. I am working on a little project mainly to get to grips with Elastic Search and I have hit a stumbling block and I was looking for some advice.
I am starting to ask myself am I using the right tool for the job as I cannot seem to find a way of solving the problem - however this could just be due to my inexperience.
Anyway, here is the problem I have....
So I have a document which contains a array of objects which have a bunch of properties. I would like to be able to chuck a list of terms at ES and it returns any documents whose inner array property matches. The next bit is the bit I am getting stuck on, I want to filter the documents so that only documents whose array is fully matched the search terms are returned. Its doesnt matter if the documents array contents is a subset of the search terms but all of the arrays contents must be matched. Hope I have managed to describe that well enough!
As a example:
I have a person document with some properties and a inner array of interests which also have a load of properties...
Person
Name
Age
Sex
Interests
Name (property of a interest)
Category (property of a interest)
Some other property (property of a interest)
another property (property of a interest)
So say I have a guy called Bob, he likes squash, fishing and tennis. And I have another guy called Fred, he likes squash, fishing, tennis and football. And finally I have a guy called Jim, he likes fishing and tennis.
Now if I search for fishing, tennis and squash I want Bob and Jim to be returned because everything in their array matched the search terms even though Jim's was only a subset. Fred does not get returned because he likes foodball which wasent in the search terms.
Could anyone help or point me in the right direction of how I can achieve this, I have looked into scripted filteres however I cannot seem to find enough detail to achieve the desired behavior.
Thanks
Dom