title: How do I do proximity search in Oracle right?
body: <p>Oracle's <a href="http://download.oracle.com/docs/cd/B19306_01/text.102/b14218/cqoper.htm#i997808" rel="nofollow noreferrer">NEAR operator</a> for full text search returns a score based on the proximity of two or more query terms. For example:</p>
  
  <blockquote>
    <p>near((dog, bite), 6)</p>
  </blockquote>
  
  <p>matches if 'dog' and 'bite' occurs within 6 words. What if I'd like it to match if either 'dog' or 'cat' or any other type of animal occurs within 6 words of the word 'bite'? I tried:</p>
  
  <blockquote>
    <p>near(((dog OR cat OR animal), bite), 6)</p>
  </blockquote>
  
  <p>but I got:</p>
  
  <blockquote>
    <p>NEAR operand not a phrase, equivalence
    or another NEAR expression</p>
  </blockquote>
  
  <p>Rather than expanding all possible combination into multiple NEAR and 'or' them together, what is the proper way to write such query?</p>