Enable search box suggestions-as-you-type that match words or phrases anywhere in the page title

Jump to: navigation, search

The [1] commit implements a prefix wildcard search.

- Enable wildcard prefix search suggestions ($wgSphinxPrefixSearchAdvanced = false;)

- Extend prefix search namespace beyond NS_MAIN ($wgSphinxPrefixSearchNamespaces = false;)

- Extend prefix result display limit ($wgSphinxPrefixSearchLimit = 15;)

[1] https://gerrit.wikimedia.org/r/#/c/15859/

MWJames (talk)00:23, 18 July 2012

Hallo MWJames, I think this is a great idea. But on my 1.19 MW it just won't work. Sphinx itself is running smoothly but I cannot find out why the "InfixSearch" will NOT work.
I checked here: sphinx.conf:

min_infix_len = 1
enable_star = 1


And also in LocalSettings.php

$wgSearchType = 'SphinxMWSearch';
require_once( "$IP/extensions/SphinxSearch/SphinxSearch.php" );
$wgSphinxSearch_port = 9312;
$wgEnableSphinxInfixSearch = true;
$wgSphinxPrefixSearchAdvanced = true;
$wgSphinxPrefixSearchNamespaces = true;
$wgSphinxPrefixSearchLimit = 15;

I got the "updated" version from here: https://gerrit.wikimedia.org/r/#/c/15859/
Your help would be highly appreciated ;-) Thank you!!!

SmartK (talk)12:09, 16 August 2012

Ohhh, my fault. It wasn't MWJames how thought of this. I am sorry. So I just implemented the code from the anonymous user "198.176.189.201" ;-) Now the "InfixSearch" is working like a charm. Couldn't we implement this in standard git aswell? I think this would be really good!

SmartK (talk)12:22, 16 August 2012
Edited by 0 users.
Last edit: 13:02, 16 August 2012

Just found a "bug" with the now working "InfixSearch". As soon as I turn on "$wgEnableSphinxInfixSearch = true;" the auto-complete will NOT work IF there is a character like "ä, ö, ü" in the search-term. If the InfixSearch is OFF the auto-complete works flawless.

SmartK (talk)13:02, 16 August 2012