Extension talk:SphinxSearch
![]() |
|
[edit] Help
When seeking help and/or support, you might want to consider to mention your system environment (SphinxSearch Extension version, Sphinx version, MW version etc.) otherwise it might be difficult for people to make appropriate recommendations.
For Windows users and related issues see here, for Linux users and related issues see here, and some advice on how to configure a SQLite setup see here.
Contents
Thread title | Replies | Last modified |
---|---|---|
Trouble to find words in pages that are inside a custom namespace | 1 | 15:00, 18 May 2012 |
SphinxSearch and MediaWiki 1.19.0 -- fixed | 2 | 15:35, 16 May 2012 |
Sphinx Extension Doesnt work for me | 1 | 10:32, 11 May 2012 |
Usage with Sphinx 2.0.4 | 1 | 23:10, 6 May 2012 |
I am having trouble to find words in pages that are inside a custom namespace.
I have installed Sphinx and SphinxSearch and it seems to be working, the queries are definitely going from the MediaWiki UI to the sphinx daemon, I executed "searchd.exe" in the console, and it is receiving the words that I type in the mediawiki search box.
If I type a word that exists in the main page, then it finds the main page, but if I type a word that is in a page with a custom namespace, then nothing... mediawiki just gives the option to create a new page, and nothing more.
I am sure that the word I am searching is there, and that sphinx can find it. If I execute "search.exe" and try to find the very same words, it says that it exists in some documents with a lot of hits.
I am executing this:
search -c C:\Sphinx\sphinx.conf -i wiki_main -e "equip"
and it returns this:
displaying matches: 1. document=5, weight=2620, page_namespace=3000, page_is_redirect=0, old_id=11, category=() page_title=Equipe page_namespace=3000 2. document=4, weight=1620, page_namespace=3000, page_is_redirect=0, old_id=12, category=() page_title=Principal page_namespace=3000
words: 1. 'equip': 2 documents, 4 hits
Notice that it knows about my custom namespace that have the id=3000.
If I try to search for the same thing using MediaWiki search box, the search daemon shows this:
[Fri May 18 11:20:44.101 2012] 0.004 sec [ext2/1/rel 0 (0,20)] [*] equip
That means that it is receiving the "equip" word from the search box. But MediaWiki just says that there is no results, and suggests that I create the page.
What is wrong?
Why I cannot find the same results from "search.exe", by using MediaWiki search box?
Thanks!
Are you sure your custom namespace is selected? By default, MW searches only a limited set of namespaces. You need to change your search preferences, or use "Everything" or "Advanced" tabs to search additional namespaces.
After migraging to MediaWiki 1.19.0 SphinxSearch 0.85 does not work on the Spechial:Search page anymore (no results). The sidebar Search works.
After logging the searchd with --console, you found a message "query error: no such filter attribute 'page_is_redirect'" in the console. I searched this text and found it in 'SphinxMWSearch.php'. I change the line
$cl->SetFilter( 'page_is_redirect', array( 0 ) );
to
// $cl->SetFilter( 'page_is_redirect', array( 0 ) );
and everything works (for me).
I also change the method 'userHighlightPrefs' to
public static function userHighlightPrefs() {return array( 2, 75 ); }
because the the definition changed (and I got warning when I activated "$wgShowExceptionDetails" in LocalSettings.php).
I hope this helps others fixing the same problems.
Perhaps page_is_redirect is missing in the sphinx.conf? It did not use to be there by default, but in more recent versions you should see it in at least three places in your sphinx.conf, in both sql_query settings, and in one sql_attr_uint setting. After you change the config file, you need to reindex the wiki.
I am new to media wiki and for that matter to any web application development. I was exploring Mediawiki and have installed "MediaWiki 1.18.2" and have attempted to integrate Sphinx search. I have used "Sphinx 2.0.4-release".
The problem I am facing is that I am unable to search through the contents of the pages or the documents embedded in the MediWiki. It is only able to search the Title of the Pages. This is the same irrespective of the "GO" button or the "SEARCH" button. Whereas Through the command in the Sphinx Search, I am able to find all the text. Can someone please help me in debugging this.
The documentation is quite extensive (compared with other extensions), and it might be that you need to do the setup more than ones to fully understand the implication in how searchd, indexer and SphinxSearch is working together. If you follow the steps outlined in the documentation you should be able get the extension working but it will be hard for anyone to give any guidance as long their are no particular problems to solve.
For example did you do "Step 4 - Test Out Sphinx" to ensure that the infrastructure is setup correctly otherwise if this step fails something is wrong in your configuration and searching within MediaWiki will definitely not work as advertised.
In order to use Sphinx in MediaWiki you have register the extension, see "Step 9 - Extension Installation - Local Settings"
You should also consult the Extension:SphinxSearch/Troubleshooting page.
Has anyone been able to successfully use this extension with Sphinx version 2.0.4? I receive the following error when "testing out sphinx" (step 4):
index 'wiki_main': search error: .
The only explanation I can think of is that perhaps the way the config file sets up the index is no longer compatible with the newer version of Sphinx. Has anyone been able to successfully run Sphinx 2.0.4 with their wiki, or should I downgrade my installation to Sphinx 2.0.3? I appreciate any assistance.
Update: The SphinxSearch extension itself appears to be functional even though queries from the command line are not. Feel free to close/delete this support thread.
Actually we are using 2.0.4 in production with the latests SphinxSearch 0.8+ and we are using the exact same setup as with. (we haven't changed the configuration neither in case of 2.0.3/2.0.4). I'm not sure from where you get the message testing out sphinx, we have never seen this kind of message coming from Sphinx nor SphinxSearch. --MWJames (talk) 00:43, 6 May 2012 (UTC)