Answer the question
In order to leave comments, you need to log in
How to configure sphinx search so that word order is not taken into account?
Here is the index config:
index catalog
{
source = catalog
path = /path
morphology = stem_enru
min_word_len = 1
min_prefix_len = 0
min_infix_len = 2
enable_star = 1
expand_keywords = 1
}
$rows = $query->from('catalog')
->match(new MatchExpression(':match', [
'match' => $q,
]))
->all();
Answer the question
In order to leave comments, you need to log in
The problem was not in the settings of the sphinx, but in the request itself. If the string is wrapped in a MatchExpression, then in the sql query it turns out like this:
If you do not use MatchExpression, then the query does not contain brackets, and the search works as it should.
WHERE MATCH('\"Search str\"')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question