Start FAQ Software Cms Mediawiki configure Sphinxsearch für jedes wiki
configure Sphinxsearch für jedes wiki PDF Drucken E-Mail
Geschrieben von: Administrator   
Mittwoch, den 02. März 2016 um 16:32 Uhr

Configure Sphinxsearch für jedes wiki

Hier geht es um die Konfiguration von SphinxSearch mit Mediawiki

 

In einem Projekt habe ich einen Wikiserver mit über 30 Wikis betreut.
Die Heruasforderung war heirbei eine Suche einzubauen die deutlich performanter ist
als die interne Wikisuche.

 

Damit die Suchengine nur die Datenbank des jeweiligen Wikis abfragt muss man einiges konfigurieren.

 

###################################################################
### sphinxSearch Extension
####################################################################
$wgSearchType = 'SphinxMWSearch';

require_once( "$IP/extensions/SphinxSearch/SphinxSearch.php" );
$wgSphinxSuggestMode = true;
#$wgSphinxSearchAspellPath = "/usr/bin/aspell";
$wgSphinxSearch_index = 'wiki_main_wikiname';  #### Take the Main_index from the crontab-list for each Wiki

#Options
#For the most part, the extension's default options do not need any modification. However, if tweaking is needed/desired, there are a number of configuration options that could be configured from LocalSettings.php after the above require_once line. Those are:
# $wgSphinxSearch_host - the hostname on which sphinx's searchd daemon is running (defaults to localhost)
# $wgSphinxSearch_port - the port number on which sphinx's searchd daemon is running (defaults to 9312)
# $wgSphinxSearch_mode - the Sphinx search mode. The default mode is the most intuitive. See Sphinx documentation for other valid options.
$wgSphinxSearch_mode = SPH_MATCH_EXTENDED;
# $wgSphinxSearch_matches - the number of search hits to display per result page.
# $wgSphinxSearch_matches = 10;
# $wgSphinxSearch_weights - the way Sphinx orders the results. The default is pretty good. See Sphinx documentation for other valid options.
# $wgSphinxSearch = SPH_MATCH_ANY;
# $wgSphinxSearch_groupby, $wgSphinxSearch_groupsort - define how to group the results. See Sphinx documentation for other valid options.
# $wgSphinxSearch_sortby - set matches sorting mode (default to SPH_SORT_RELEVANCE). See Sphinx documentation for other valid options.
#$wgSphinxSearch_sortby = SPH_SORT_RELEVANCE;
# $wgSphinxMatchAll - when using the default $wgSphinxSearch_mode (which gives the user radio buttons to choose between "match any word" and "match all words"), setting this to true makes "match all words" the default.

$wgSphinxSearch_index = 'wiki_main_wikiname';

Zuletzt aktualisiert am Freitag, den 26. Januar 2018 um 18:24 Uhr
 

Powered by hardwarecrash Valid XHTML and CSS.