How would I write a query in which I want to find sentences that include all three terms: word1 number1 word2, where number1 and word2 have a proximity relationship to each, and neither number1 and word2 have a proximity relationship with word1 other than they all are in the same sentence?
If number1 and word2 are to be required to be adjacent and in that order, make them a phrase:
word1 "number1 word2" w/sent
Otherwise:
word1 number1 word2 w/sent
Use LIKEP to rank hits with these words closer together as higher. Note that you may have to use <apicp alwithin on> and <apicp alpostproc on> to enable the within operator (requires post-processing, which is slower).
I don't have the flexibility to change any of the api's because I am working with the final application. Is there a way to nest REX operations if word2 and number1 have some non-adjacent proximity?