Let's say I have a index in elasticsearch with two fields: title and tags. I have few documents there
Should be returned by query
{ title: "My main title on this page", tags: ["first", "whatever"] }Should not be returned by query
{ title: "My on this page", tags: ["first", "page", "whatever"] }Should be returned by query
{ title: "My main title on this page", tags: ["page", "whatever"]}
I want to find all documents which title CONTAINS "main title" AND tag "first" OR "page".
I want to use java API for this, but I'm not sure how can I do this. I know that I can use filter query to create "or" and "and". Not sure how can I add to query the title part, and how can I get the logic with "at least one from the list".
Any ideas?