I'm trying to create a search engine that uses Lucene syntax boolean queries to do searches against different thirdparties api. It all seems to work fine, the user enters the query in a textfield and I parse it using https://www.npmjs.com/package/lucene-query-parser to see that it's acctually a valid Lucene query. However, now I have gotten a request to have a query with multiple OR:s in a proximity search. So basically they want to search on A, B or C, any of those should be close to Z, X OR Y. The normal Lucene proximity search looks like this:
"a b"~20
Which gives me all hits where a is 20 words or closer to b. I have been looking all over the place for the syntax of doing this multiple OR proximity search with Lucene for a couple of days now but haven't found anything. Is it even possible?
I have tried stuff like this: "a OR b, x OR z"~20 "a b OR x z"~20 "a, b OR x, z"~20
But none of them work. Thanks in advance!