Search terms phrase and or



I would like to search like this (my query):

(“word1 word2” | word3^20 word4 word5)

The result should be (best ranking):

  1. all records witdh word1 + word2
  2. all records width word3 and maybe word4 + word5
  3. all records width any of the 5 words

I get only records with word1 + word2 …

what i’m doing wrong?

kind regards


First of all, OR operator has higher precedence than implicit AND, so your query means:

("word1 word2" | word3^20) word4 word5

and not

"word1 word2" | (word3^20 word4 word5)

Also this query doesn’t do what you want. I can try to make better query, but few questions first about what you want:

At 1), do the words word1 and word2 have to be adjacent?

At 2), do you mean:
a) word3 and maybe BOTH of word4 and word5
b) word3 and maybe EITHER OR BOTH of word4 and word5

Also if you mean a), then do the words word4 and word5 have to be adjacent?



found the solution with one more “|” and a higher lcs

tnx Peter