Bag of words query within a certain proximity

I was wondering whether there's a way other than a span near query where I can specify a bag of words to be searched against a document but where the words can be in any order and have a defined slop? I was thinking of this in the context of a simplified search api, a bit like the query string query api, where I could write something like:

"one two three"~-2 where - represents 'any order'- ie., find these three words with a max of 2 intervening words, in any order in my document.

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