Search code examples
phpsphinx

How to use 2 stopwords files for 2 languages


I am trying to using Sphinx Stop words functionality for 2 languages having one index.

I am trying 2 add stopwords files like this

stopwords = /var/data/stopwords-en.txt /var/data/stopwords-ru.txt

By using Above pattern the stopwords for english works well but for non english language it blocks the overall search results and show 0 results.

And

stopwords = /var/data/stopwords-en.txt
stopwords = /var/data/stopwords-ru.txt

By using this the stopword functionality is not working

Looking forward for a solution for stopwords for both languages

Thanks


Solution

  • i got the issue: See this line:
    $q = '"' . $cl->EscapeString($_REQUEST['input']) . '"/1 @language en'; The @language parameter fetches extra results. If it removed this then stop words works perfectly. But I must need this parameter to filter results according to language.