Topic on Extension talk:Lucene-search

How can I tell if search suggestions are working?

5
Chiefgeek157 (talkcontribs)

I believe I have correctly configured the Search Suggestions feature in both Lucene-search (2.1) and MediaWiki (1.19). Searches work fine and are hitting the Lucene daemon. However, search suggestions are not displayed while I type in the search box, which I am assuming is what the MWSearch extension provides when coupled with the Search Suggestions variables correctly configured.

How can I confirm if search suggestions are working? What is the expected behavior? How can I tell if I have an incorrect setting?

Subfader (talkcontribs)
Chiefgeek157 (talkcontribs)

In MW 1.19 at least, $wgEnableAPI is enabled by default, so that is not the problem.

My question is, what does it look like when Search Suggestions are working correctly? Should I see any INFO messages in the lsearchd process output (like I do when actually performing a search)? What should I be seeing in the browser?

I guess another question is, does anyone have this working right now?

Chiefgeek157 (talkcontribs)

So I used Chrome's developer console on Wikipedia and on my wiki. It is obvious that this function is working on Wikipedia for two reasons:

  1. The search suggestion box appears as I type a search
  2. The Chrome XHR console shows a Javascript request to the Wikipedia server with each keystroke in the search box

On my wiki, I do not see the Javascript interaction with my server on keystrokes, so that tells me that it is likely that the Javascript to do Search Suggestions is not being sent to the browser.

I have the following in my LocalSettings.php:

$wgSearchType = 'LuceneSearch';
$wgLuceneHost = 'mywikiserver.mydomain.com';
$wgLucenePort = 8123;
$wgEnableLucenePrefixSearch = true;
$wgLucenePrefixHost = 'mywikiserver.mydomain.com';
require_once( "$IP/extensions/MWSearch/MWSearch.php" );
$wgLuceneSearchVersion = 2.1;

My lsearch-global.conf file contains this:

[Database]
wikidb : (single) (prefix) (spell,4,2) (language,en)

When I run 'build', I see the prefix index being built. When I run 'lsearchd', I see the prefix index being loaded. I can see the searches working by watching the console output of lsearchd (just running in shell for the time being). I do not see any indication that the Search Suggestions are reaching the server (but I knew that from the Chrome console anyway).

Am I missing some configuration parameter that would enable the Javascript for Search Suggestions to be sent to the browser?

Chiefgeek157 (talkcontribs)

Found it. I had to add:

$wgEnableMWSuggest = true;
Reply to "How can I tell if search suggestions are working?"