Answer the question
In order to leave comments, you need to log in
Why doesn't Sphinx search if there is a word in the query that is not in the index?
Let there be an index containing the phrase "gas burners from Uncle Vova".
If you search for a phrase that contains only words from the index, then the sphinx searches.
If you add some superfluous word, for example, "buy gas burners from Uncle Vova", then the sphinx does not produce results.
I would like to make it so that if there are a couple of extra words in a long query, then the sphinx could ignore the inexact match.
match mode any is not suitable, because it looks for every word in all the data. And the more words, the more results.
Answer the question
In order to leave comments, you need to log in
You can try this construction (this is sphinxql):
which means to find all documents containing at least 2 of the words "word1 | word2 | word3 | word4"
Accordingly, for "buy gas burners from Uncle Vova" the algorithm will be as follows:
PS I suspect that this is not the most correct solution, but 20% better than nothing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question