How to make a request in the sphinx, like the usual LIKE operator "% somestring%",

I am using sphinx and want to search for elements containing the first AND text containing different text in another column.

I tried this: @Name na @LastName test

But it only returns a string that matches exactly two words, I need results.

Name Test1, Name test2, OtherName lastnametotest,

Any help would be really appreciated,

Thank.

+3
source share
1 answer

You can use the OR operator for first matches

SELECT * FROM YOUR_INDEX WHERE MATCH ('(@name test1 | test2) @othername lastnametotest');

-1
source

Source: https://habr.com/ru/post/1790110/


All Articles