Extension:SphinxSearch/Troubleshooting

From MediaWiki.org
Jump to navigation Jump to search

This troubleshooting page should work as a kind of first aid, when SphinxSearch don't seemed to work. The content on this page is taken from the talk page and condensed in a form so it can be used as check list for things that can go wrong. Any one with a particular experience in how to minimize installation hurdles can share his/her advice here (so others don't have to suffer). For particular problems, please use the talk page or bugzilla report instead.

General configuration troubleshooting[edit]

Did I copy the right sphinxapi.php file?[edit]

With every new Sphinx Search Engine (0.9.9, 1.10, 2.0.1 etc.) a new sphinxapi.php is deployed, therefore it is necessary that the sphinxapi.php corresponds with the downloaded sphinx package.

How can I check the connection between Sphinx Search Engine and Mediawiki?[edit]

In order to check if a connection can be established between Sphinx and Mediawiki, you can run the searchd deamon in a command shell so that something like below appears when executing the following command.

%~dp0bin\searchd.exe --console --config "%~dp0sphinx.conf" --pidfile
Sphinx 1.10-beta (r2420)
Copyright (c) 2001-2010, Andrew Aksyonoff
Copyright (c) 2008-2010, Sphinx Technologies Inc ...

using config file '...\Sphinx\sphinx.conf'...
listening on 127.0.0.1:9312
listening on all interfaces, port=9312
precaching index 'wiki_main'
precaching index 'wiki_incremental'
precached 2 indexes in 0.048 sec
accepting connections

If those information do not appear, you need to check your sphinx.conf and index files.

When executing a search in Mediawiki, information as below should appear in your command shell.

Extension-SphinxSearch-Actual-Search.png

If those information do not appear in the command shell, the probability is high that their is no connection between Mediawiki and Sphinx. You should check your installation settings:

  • Configuration of sphinx.conf (database setting etc., password )
  • Run indexer
  • sphinxapi.php file
  • LocalSettings.php ( $wgSearchType = 'SphinxMWSearch'; $wgSphinxSearch_host = '127.0.0.1'; , etc.).

Default namespaces[edit]

$wgNamespacesToBeSearchedDefault describes how to change the default search namespaces setting (to include other namespaces by default).

Search result output[edit]

Search output such as "+I-.I��K�(���J�L�PH�" can be the result of LocalSettings.php settings $wgCompressRevisions = true; (see also forum 7016) Using the Manual:CompressOld.php script periodically instead of $wgCompressRevisions should allow current revision text to be readable (non-compressed text is necessary for Sphinx) with only old revisions to be compressed.

Windows troubleshooting[edit]

Sphinx as windows service[edit]

According to [1] the parameter binlog_path should be maintained within sphinx.conf to avoid problems with writing permissions when running Sphinx as a windows service (Error 1067).

# Binary log (aka transaction log) files path
binlog_path = C:\Sphinx\log

For more information, see [2]

localhost vs. 127.0.0.1[edit]

Windows Vista[3] and Windows 7 showed problems when $wgSphinxSearch_host is maintained as localhost therefore it is recommended that instead of localhost one uses 127.0.0.1 instead. The standard configuration should look like:

# Host and port on which searchd deamon is tunning
$wgSphinxSearch_host = '127.0.0.1';
$wgSphinxSearch_port = 9312;

Copy the sphinx.conf file from the extension folder[edit]

Please ensure that when using Sphinx, you copied the sphinx.conf from the extension folder into the appropriate folder (e.g. C:\Sphinx\ ). Sometimes it happens that people displace the sphinx.conf file and can therefore not establish any connection between Mediawiki and Sphinx.

Windows 7 and Indexer[edit]

Some users reported that the file Msvcr71.dll is necessary for running the Indexer successful on Windows 7, on how to solve this problem see[4].

Notes[edit]

  1. forum 9489
  2. 2.0.4 manual
  3. For further information, please consult the Sphinx forum
  4. In how to fix the problem, you might consult Msvcr71.dll Missing Error or Msvcr71.dll Not Found Error Resolution.