I
I
Igor Yatsevich2014-02-18 13:43:04
Sphinx
Igor Yatsevich, 2014-02-18 13:43:04

How to implement substring search in Sphinx taking into account morphology?

Hello!
There are two queries:
"cartoon characters" and "cartoon characters"
With the option:
expand_keywords = 0
everything works as intended - the number of results is the same
"cartoon characters" - 47 results.
“cartoon characters” — 47 results.
and if you want to use a search based on prefixes, then the number of results is different,
expand_keywords = 1 then
"cartoon characters" - 47 results.
“cartoon characters” — 39 results.
You just need to search for prefixes, but if you use it, then it seems that sphinx does not discard the endings.
Question:how to make it so that the number of results does not depend on the end of the word in the expand_keywords = 1 mode?
ps Sphinx version - 2.2.1
morphology = lemmatize_ru_all or morphology = stem_enru no difference
pps Rewriting as a query using asterisks didn't make any difference either

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
klirichek, 2014-04-22
@klirichek

You, in addition to guesswork, also look at the exhaust of actual keywords.
(in api it is in the result set; in sphinxql you need to say show meta immediately after select)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question