D
D
Dmitry2018-03-01 15:37:47
Sphinx
Dmitry, 2018-03-01 15:37:47

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

2 answer(s)
N
neol, 2018-03-01
@neol

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.

P
Puma Thailand, 2018-03-01
@opium

Change the search mode to something else

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question