user3649739
user3649739

Reputation: 1869

Sphinx NEAR and << issues

I'm looking for a pattern where Word 1 is near AND before Word 2. So my basic query was like

(Word1 << Word 2) (Word1 NEAR\2 Word2)

Which will naturally match

but not match

The problem is it DOES match

is that matches both the NEAR/1 and the << conditions though not in the way I intended.

Is there any other operator/logic I can use to negate the match in the last example?

Upvotes: 0

Views: 70

Answers (1)

barryhunter
barryhunter

Reputation: 21091

The closest I can think is

"Word1 word2" | "word1 * word2"

Upvotes: 0

Related Questions