How does Wikimedia add Redirects + Section links into its search results?
How does Wikimedia add redirects + section links into their search results?
For example, if you search the term 'maderia portugal' you get something similar to the following:
- Ribeira Brava, Madeira (redirect from Ribeira Brava, Portugal)
- Boal (grape) (section Maderia Boal)
By default, Lucene neither strips the formatting nor presents these additional links - which forces the user to the top of the page, having to either find the section they were looking for in table of contents or scroll through the page.
bump?
That's not possible with the standard sql search. IIRC, you need an indexing search engine such as Lucene
Hi, sorry I forgot to mention
I am using the following:
- MediaWiki 1.19.1
- PHP 5.4.5 (apache2handler)
- MySQL 5.5.25a-log
- Lucene 2.1
Update guys (original IP 50.90.206.233, same person): I talked to Rainman via email and he was able to help me out a bit.
Basically what he said was that the feature I am requesting is actually enabled with the $wgLuceneSearchVersion = 2.1; parameter (he designed these features to be included).
However, unfortunately for me, this does not appear to be working at all. In fact, I have tried setting it manually in the MWSearch.php file and it's still not acting as such. Interestingly, search itself seems to work (confirmed by disabling Lsearch daemon will suddenly yield 0 results) - it's just the highlighting that isn't working - it neither strips markup nor generates the links. I am thinking possibly there is a problem with my java installation as when I run the ./configure script off of a fresh ls2 install it brings several incorrect items in the initial config files that I must go and correct by hand (seems to be an escape char because it starts with [1034h on each line that it's supposed to auto-generate)
I hope this helps some of you with your troubleshooting; in the meantime I will post back when I find out more.
Guys it's totally working now!
Rolled back from SVN version of Lucene-Search 2.1 to the git version; had to restart as well because the service from the old version was stuck in memory + couldn't kill it - worked like a charm, just like Wikipedia search!
I want to give a huge shoutout to Rainman here who was extremely helpful, even taking time out of his extremely busy schedule to assist a noobie.
Also the rest of the #wikimedia staff were very patient with me when I was asking in IRC, and did their best to point me in the right direction.
Cheers, hope this helps someone else as much everyone has for me. :)