German Language flagEnglish Language flag
// Log In // New Account
Project: evolvis
// Summary // Activity // Search // SCM
// View Trackers // old Bug Reports // Download .csv // Monitor

[#1031] Broken search in gf-p-mediawiki

Details
Status:
Closed
Resolution:
Fixed
Priority:
1
Assigned to:
Nobody (None)

Votes: 0/0 (0%)

Version:
-
Linked Bugs:
-
Date Submitted:
2010-10-27 14:21
Date Closed:
09/23/2011 13:17

Submitted by:
Thorsten Glaser (mirabilos)

Permalink
https://evolvis.org/tracker/t_follow.php/1031

Item Detail Information:
application/json / text/plain

Please login
Please log in. • If you cannot login, then enter your email address here to submit a new item, post a comment or make any other permitted changes.

Anonymous User eMail*:

Item Description
Summary*:
Broken search in gf-p-mediawiki
Detailed description:

Enter the Wiki of the Evolvis project:

https://evolvis.org/plugins/mediawiki/wiki/evolvis/index.php/Main_Page

Locate the “search” box on the left-hand side. Type “Features” into the
input box and hit the 「Search」 button (*not* Return key). End up on:
https://evolvis.org/plugins/mediawiki/wiki/evolvis/index.php?title=Special%3ASearch&search=Features&fulltext=Search

-----BEGIN SNIPPET-----
Search results
You searched for Features (all pages starting with "Features" | all pages that link to "Features")
For more information about searching Evolvis Wiki, see Help.
Features 1Special:SearchSearchSearch
No page text matches
Note: Only some namespaces are searched by default. Try prefixing your query with all: to search all content (including talk pages, templates, etc), or use the desired namespace as prefix.
-----END SNIPPET-----

There is, however, a page matching “Features” in the Wiki, namely:
https://evolvis.org/plugins/mediawiki/wiki/evolvis/index.php/SharePoint_Features

Why is this page not found, and how can this bug be fixed?

Followups: ▼△ Sort comments antichronologically

Date: 2010-10-27 16:28
From: Roland Mas

While I can certainly see this bug on evolvis.org, I've tried to reproduce it locally (on a fresh Lenny + Evolvis 4.8.3+evolvis27 installation), and I didn't manage. I initially suspected a mismatch in version numbers (PostgreSQL and/or Mediawiki), but
https://evolvis.org/plugins/mediawiki/wiki/evolvis/index.php/Special:Version tells me I'm using the same versions as you are, so that's a false start.

I believe Mediawiki is using the full-text search facility of PostgreSQL, at least here. If I enable query logging in the database, I get the following bits of SQL:

2010-10-27 16:24:45 CEST LOG: instruction : SELECT to_tsquery( 'Features')
2010-10-27 16:24:45 CEST LOG: instruction : SELECT /* SearchPostgres Admin */ page_id, page_namespace, page_title, ts_rank(titlevector, to_tsquery( 'Features'), 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 titlevector @@ to_tsquery( 'Features') AND page_is_redirect = 0 AND page_namespace IN ('0') ORDER BY score DESC, page_id DESC LIMIT 20 OFFSET 0
2010-10-27 16:24:45 CEST LOG: instruction : SELECT to_tsquery( 'Features')
2010-10-27 16:24:45 CEST LOG: instruction : SELECT /* SearchPostgres Admin */ page_id, page_namespace, page_title, ts_rank(textvector, to_tsquery( 'Features'), 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( 'Features') AND page_is_redirect = 0 AND page_namespace IN ('0') ORDER BY score DESC, page_id DESC LIMIT 20 OFFSET 0

Do you have similar queries? What happens if you run them by hand?

Date: 2010-10-27 16:56
From: Roland Mas

Okay, I found a way to reproduce a similar bug. It seems to be a mismatch between the FTS configuration used by PostgreSQL to generate the FTS index and the one used for searching. Basically, the index contains a list not of words but of lemmatisations, and the search uses a lemmatisation of the actual search string. If the two lemmatisations are not done according to the same rules, no results show up. I'm looking for where these configurations are defined.

Just for the record: searching for "featur" returns the appropriate results, probably because the lemmatisation of that word matches the one used for "features".

Date: 2010-10-27 17:47
From: Roland Mas

Temporary work-around: /usr/share/mediawiki/includes/SearchPostgres.php line 144, set $prefix to "'default'," (as if $wgDBversion was < 8.3). My opinion is that this is a bug in Mediawiki.

Date: 2010-10-28 11:14
From: Thorsten Glaser

Workaround put into action, merci!

Keeping this open with low priority to get it resolved
upstream, maybe…

Date: 2011-08-31 10:28
From: Thorsten Glaser

I reported this upstream, but not as a bug, because this is apparently a pre-8.3 compatibility mode which I guess infers we need to update/regenerate the search database:

http://www.mediawiki.org/w/index.php?title=Thread:Project:Support_desk/PostgreSQL_and_the_database_search

Let’s see what upstream says to this.

* indicates required fields.
Item Relationships
You do not have sufficient privileges to view Task relations.
History
FieldOld ValueNew ValueDateBy
close_date 09/16/2011 11:19 09/23/2011 13:17 09/23/2011 13:17 papel
Resolution None Fixed 09/23/2011 13:17 papel
status_id Open Closed 09/16/2011 11:19 papel
close_date None 09/16/2011 11:19 09/16/2011 11:19 papel
priority 5 1 10/28/2010 11:14 mirabilos