sphinx.search.SearchLanguage¶
-
class
sphinx.search.SearchLanguage(options)[source]¶ This class is the base class for search natural language preprocessors. If you want to add support for a new language, you should override the methods of this class.
You should override lang class property too (e.g. ‘en’, ‘fr’ and so on).
-
stopwords¶ This is a set of stop words of the target language. Default stopwords is empty. This word is used for building index and embedded in JS.
-
js_stemmer_code¶ Return stemmer class of JavaScript version. This class’ name should be
Stemmerand this class must havestemWordmethod. This string is embedded as-is in searchtools.js.This class is used to preprocess search word which Sphinx HTML readers type, before searching index. Default implementation does nothing.
-
Methods¶
__init__(options) |
|
init(options) |
Initialize the class with the options the user has given. |
split(input) |
This method splits a sentence into words. |
stem(word) |
This method implements stemming algorithm of the Python version. |
word_filter(word) |
Return true if the target word should be registered in the search index. |
Attributes¶
js_stemmer_code |
|
js_stemmer_rawcode |
|
lang |
|
language_name |
|
stopwords |