Why Sphinx does not search, if the request is a word that is not in the index?

Suppose there is a index containing the phrase "gas burner from uncle Vova".
If you search for a phrase that contains only index words, the Sphinx is looking for.
If you add any extra word, such as "buy gas burner from uncle Vova", that Sphinx does not give results.
I would like to do so that if there are a few extra words in a long query, then the Sphinx would be able to ignore an inaccurate match.
any match mode is not suitable because it searches for every word in all the data. And the more words, the more results.
June 7th 19 at 15:03
2 answers
June 7th 19 at 15:05
You can try this design (it's sphinxql):
WHERE MATCH('"word1 | word2 | word3 | word4"/2')
which means to find all documents that contain at least 2 of the words "word1 | word2 | word3 | word4"
Respectively, for "buy gas burner from uncle Vova" algorithm will be like this:
  1. looking for full text
  2. if none is found, then split the query on the word "buy | gas | burners | from | uncle Vova"
  3. just in case, better to remove duplicates of words
  4. take the number of words and subtract 1
  5. sent to sphinx query with the WHERE MATCH('"buy | gas | burners | from | uncle Vova"/5') where 5, is the number obtained in the previous step
  6. if nothing found, return to step 4


PS I suspect that this is not the right decision, but 20% is better than nothing.
June 7th 19 at 15:07
Change the search mode to another

Find more questions by tags Sphinx