Answer the question
In order to leave comments, you need to log in
Why does sphinx take a long time to execute the "cccccc" query?
Hello everyone, there is a request consisting of single Russian letters, for example "с с с с с с с с". If you insert one letter, for example "c", then the query is executed quickly. A search of two or more letters takes longer than a second. If you execute show meta, you can see that each addition of a letter increases docs by a multiple of the number of letters. There are about 130k documents in the index.
How to make the search fast regardless of the number of letters?
Answer the question
In order to leave comments, you need to log in
I found the expansion_limit parameter set to 40. Now the search is working much faster. We also added filtering by the average word length, if the average word length in the request is less than a certain value, then we issue an error that the request is not correct (for now, the value is 2). There is also a limit on the number of words in a query.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question