Author: alessandro
Description:
I
have a problem with MediaWiki 1.10.0 and PostgreSQL 8.1.9 (from Ubuntu
Server 6.06.1 LTS).
Well, my little problem started today, when I do an update in MediaWiki
from 1.9.3 to 1.10.1.
Everything worked fine, but when I tried to search to something I got:
Warning: pg_query() [function.pg-query]: Query failed: ERROR:
unrecognized normalization method: 5 in
/var/www/embratel-wiki/includes/DatabasePostgres.php on line 497
Internal error
A database error has occurred Query: SELECT page_id, page_namespace,
page_title, rank(textvector, to_tsquery('default','ECT'),5) AS score
FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id
AND r.rev_text_id = c.old_id AND textvector @@
to_tsquery('default','ECT') AND page_is_redirect = 0 AND page_namespace
IN (0) ORDER BY score DESC, page_id DESC LIMIT 20 OFFSET 0 Function:
Error: 1 ERROR: unrecognized normalization method: 5
Backtrace:
#0 /var/www/embratel-wiki/includes/Database.php(762):
DatabasePostgres->reportQueryError('ERROR: unrecog...', 1, 'SELECT
page_id,...', '', false)
#1 /var/www/embratel-wiki/includes/SearchPostgres.php(44):
Database->query('SELECT page_id,...')
#2 /var/www/embratel-wiki/includes/SpecialSearch.php(158):
SearchPostgres->searchText('ECT')
#3 /var/www/embratel-wiki/includes/SpecialSearch.php(108):
SpecialSearch->showResults('ECT')
#4 /var/www/embratel-wiki/includes/SpecialSearch.php(40):
SpecialSearch->goResult('ECT')
#5 /var/www/embratel-wiki/includes/Wiki.php(143): wfSpecialSearch()
#6 /var/www/embratel-wiki/includes/Wiki.php(45):
MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage),
Object(WebRequest))
#7 /var/www/embratel-wiki/index.php(89):
MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User),
Object(WebRequest))
#8 {main}
Well,
The update.php command executed fine...
I think that this problem is related with tsearch2, because if I
executed the query without rank parameter[1], I got:
"page_id";"page_namespace";"page_title";"score"
13;0;"SERV/Projeto_SGRC-ECT";0.0942146
References:
1-) SELECT page_id, page_namespace, page_title, rank(textvector,
to_tsquery('default','ect')) AS score FROM page p, revision r,
pagecontent c WHERE p.page_latest = r.rev_id AND r.rev_text_id =
c.old_id AND textvector @@ to_tsquery('default','ect') AND
page_is_redirect = 0 AND page_namespace IN (0) ORDER BY score DESC,
page_id DESC LIMIT 20 OFFSET 0
Version: 1.10.x
Severity: normal
OS: Linux
Platform: PC