r96402 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96401‎ | r96402 | r96403 >
Date:03:11, 7 September 2011
Author:svemir
Status:deferred
Tags:
Comment:
tweak default sphinxsearch configuration to collect categories and allow * searches by default
Modified paths:
  • /trunk/extensions/SphinxSearch/sphinx.conf (modified) (history)

Diff [purge]

Index: trunk/extensions/SphinxSearch/sphinx.conf
@@ -3,7 +3,6 @@
44 #
55 # Based on examples by Paul Grinberg at http://www.mediawiki.org/wiki/Extension:SphinxSearch
66 # and Hank at http://www.ralree.info/2007/9/15/fulltext-indexing-wikipedia-with-sphinx
7 -#
87 # Modified by Svemir Brkic for http://www.newworldencyclopedia.org/
98 #
109 # Released under GNU General Public License (see http://www.fsf.org/licenses/gpl.html)
@@ -16,9 +15,9 @@
1716 # data source
1817 type = mysql
1918 sql_host = localhost
 19+ sql_db = #replace with your db name
2020 sql_user = #replace with your db username
2121 sql_pass = #replace with your db password
22 - sql_db = #replace with your db name
2322 # these two are optional
2423 #sql_port = 3306
2524 #sql_sock = /var/lib/mysql/mysql.sock
@@ -34,10 +33,10 @@
3534 sql_attr_uint = page_is_redirect
3635 sql_attr_uint = old_id
3736
38 - # uncomment next line to collect all category ids for a category filter
39 - #sql_attr_multi = uint category from query; SELECT cl_from, page_id AS category FROM categorylinks, page WHERE page_title=cl_to AND page_namespace=14
 37+ # collect all category ids for category filtering
 38+ sql_attr_multi = uint category from query; SELECT cl_from, page_id AS category FROM categorylinks, page WHERE page_title=cl_to AND page_namespace=14
4039
41 - # optional - used by command-line search utility to display document information
 40+ # used by command-line search utility to display document information
4241 sql_query_info = SELECT page_title, page_namespace FROM page WHERE page_id=$id
4342 }
4443
@@ -48,7 +47,7 @@
4948 # in this case, full index runs at 7 AM UTC
5049 sql_query = SELECT page_id, page_title, page_namespace, page_is_redirect, old_id, old_text FROM page, revision, text WHERE rev_id=page_latest AND old_id=rev_text_id AND page_touched>=DATE_FORMAT(CURDATE(), '%Y%m%d070000')
5150
52 - # all other parameters are copied from the parent source,
 51+ # all other parameters are copied from the parent source
5352 }
5453
5554 # main index definition
@@ -73,9 +72,9 @@
7473 # minimum word length
7574 min_word_len = 1
7675
77 - # uncomment next 2 lines to allow wildcard (*) searches
78 - #min_infix_len = 1
79 - #enable_star = 1
 76+ # allow wildcard (*) searches
 77+ min_infix_len = 1
 78+ enable_star = 1
8079
8180 # charset encoding type
8281 charset_type = utf-8

Status & tagging log