Is it possible in ElasticSearch to form a query that would preserve the ordering of the terms?
A simple example would be having these documents indexed using standard analyzer:
- You know for search
- You know search
- Know search for you
I could query for +you +search
and this would return me all documents, including the third one.
What if I wanted to only retrieve the documents which have the terms in this specific order? Can I form a query that would do that for me?
Considering it is possible for phrases by simply quoting the text: "you know"
(retrieve 1st and 2nd docs) it feels to me like there should be a way of preserving the order for multiple terms that aren't adjacent.
In the above simple example I could use proximity searches, but this doesn't cover more complex cases.