Index: trunk/extensions/SphinxSearch/SphinxSearch.php |
— | — | @@ -74,8 +74,10 @@ |
75 | 75 | # Set to true to use MW's default search snippets and highlighting |
76 | 76 | $wgSphinxSearchMWHighlighter = false; |
77 | 77 | |
78 | | -# Should the suggestion (Did you mean?) mode be enabled? |
79 | | -# Possible values: enchant, soundex, aspell |
| 78 | +# Should the suggestion (Did you mean?) mode be enabled? Possible values: |
| 79 | +# enchant - see http://www.mediawiki.org/wiki/Extension_talk:SphinxSearch#Search_suggestions |
| 80 | +# soundex - uses MySQL soundex() function to recommend existing titles |
| 81 | +# aspell - uses aspell command-line utility to look for similar spellings |
80 | 82 | $wgSphinxSuggestMode = ''; |
81 | 83 | |
82 | 84 | # Path to aspell, adjust value if not in the system path |
Index: trunk/extensions/SphinxSearch/SphinxSearch_setup.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | parent::__construct(); |
19 | 19 | |
20 | 20 | $this->mDescription = "Sets up myspell dictionary (sphinx.dic and sphinx.aff) "; |
21 | | - $this->mDescription .= "for for search suggestions (suggestWithEnchant method.)\n"; |
| 21 | + $this->mDescription .= "for search suggestions (suggestWithEnchant method.)\n"; |
22 | 22 | $this->mDescription .= "Uses Sphinx indexer to create a list "; |
23 | 23 | $this->mDescription .= "of all indexed words, sorted by frequency."; |
24 | 24 | } |
Index: trunk/extensions/SphinxSearch/SphinxMWSearch.php |
— | — | @@ -230,6 +230,9 @@ |
231 | 231 | * Use SphinxSearch_setup.php to create the dictionary |
232 | 232 | */ |
233 | 233 | function suggestWithEnchant() { |
| 234 | + if (!function_exists('enchant_broker_init')) { |
| 235 | + return; |
| 236 | + } |
234 | 237 | $broker = enchant_broker_init(); |
235 | 238 | enchant_broker_set_dict_path($broker, ENCHANT_MYSPELL, dirname( __FILE__ )); |
236 | 239 | if ( enchant_broker_dict_exists( $broker, 'sphinx' ) ) { |