Topic on Extension talk:Lucene-search

Accentless searching and hiding of redirects in suggestions

3
75.173.170.65 (talkcontribs)

Hello,

I hope this is the right place to ask this — i'm not actually sure which specific extension controls this functionality, so i'm sorry if i've posted this in error.

Anyway, i'm having trouble with the search suggestions provided through the search bar (both in the top right and on the search page); i am trying to get it set up to work like Wikipedia's, and although it's almost there, there are two issues that i can't resolve:

1. Accentless searching does not work in the suggestion box. On Wikipedia for example i can type in 'lubeck' and it will display the result 'Lübeck'; on my own wiki, as soon as i hit the 'u' in 'lubeck', the Lübeck result will disappear (unless i have a redirect from 'Lubeck', which leads to my second problem...).

2. Redirects are always shown in the suggestions box. On Wikipedia if i type in 'united states of mex' (all lower-case), the only result that is shown is 'United States of Mexico' (mixed case). This is how i want mine to work, but instead i get all of the redirects that match that text — like 'United states of mexico' (sentence case) and 'United States of Mexicans' and so on.

Assuming Lucene is what controls this (and please let me know if it's not — i have MWSearch and TitleKey installed as well, so i suppose on of those could come into it), what changes might i need to make to get this working properly?

Configuration info: MW 1.18, lucene-search 2.1.3, MWSearch MW1.18-r90287, TitleKey MW1.18-r81220, Debian 6

Thank you!

Rainman (talkcontribs)

Yes, on WMF wikis this is controlled by lucene-search. Basically, what you need to do is to add something like this into your global settings:

 [Database]
 yourwiki: (prefix)

Then you can re-run the build script to build the prefix index as well. Next you need to tell MediaWiki to use lucene as backend for prefix matches. This is done by adding the following into your localsettings.php:

 # default host for mwsuggest backend
 $wgEnableLucenePrefixSearch = true;
 $wgLucenePrefixHost = '10.0.3.18'; # IP or hostname of your lucene box

For more info on WMF settings: http://noc.wikimedia.org/conf/

Thucproa1 (talkcontribs)

Is "$wgEnableMWSuggest = true" required too? Thucproa1 (talk) 03:41, 27 December 2012 (UTC)

Reply to "Accentless searching and hiding of redirects in suggestions"