Page MenuHomePhabricator

Special:SearchTranslations: allow messageid with ElasticSearch
Closed, DeclinedPublic

Description

Note:
I'm not sure if this bug should belong to translatewiki or MediaWiki. If you think that it should be moved, just do it!

Description:
[[gerrit:94064]] added an external link to translatewiki.net to every message
in Special:AllMessages. While this change is a very good idea, the produced links are completely broken. Below are some examples.

Example 1

Message ID:
abusefilter-changeslist-examine

Link:
https://th.wikipedia.org/w/index.php?title=Special:AllMessages&prefix=abusefilter-changeslist-examine&filter=all&lang=th&limit=500

Link to translatewiki:
https://translatewiki.net/w/i.php?title=Special%3ASearchTranslations&group=mediawiki&grouppath=mediawiki&query=language%3Ath^25+messageid%3A%22MediaWiki%3AAbusefilter-changeslist-examine%22^10+%22examine%22

Generated query:
language:th^25 messageid:"MediaWiki:Abusefilter-changeslist-examine"^10 "examine"

Results (failed):

  1. examine - MediaWiki:Abusefilter-changeslist-examine/en
  2. Examine individual changes - MediaWiki:Abusefilter-examine/en
  3. Examine past edits - MediaWiki:Abusefilter-topnav-examine/en

...

There is no MediaWiki:abusefilter-changeslist-examine/th in the result at all.

Example 2

Message ID:
MediaWiki:Anonnotice

Link:
https://th.wikipedia.org/w/index.php?title=Special:AllMessages&prefix=Anonnotice&filter=all&lang=th&limit=500

Link to translatewiki:
https://translatewiki.net/w/i.php?title=Special%3ASearchTranslations&group=mediawiki&grouppath=mediawiki&query=language%3Ath^25+messageid%3A%22MediaWiki%3AAnonnotice%22^10+%22-%22

Generated query:
language:th^25 messageid:"MediaWiki:Anonnotice"^10 "-"

Results (failed):

  1. 10. - MediaWiki:Oct/cs
  2. 10 - MediaWiki:Oct/ko
  3. Button label, 25 characters maximum - MediaWiki:Donate interface-monthly-donation/qqq

There is no MediaWiki:Anonnotice/th in the result at all.

My observation:

The solr search does not yield consistent results at all. Last month (June 25, 2014), I encountered this bug and attempted to solve it ([[gerrit:141728]]). Although my patch was not okay, I finally found the cause of the problem. That is, searching with query string

(for example, https://translatewiki.net/w/i.php?title=Special%3ASearchTranslations&group=mediawiki&grouppath=mediawiki&query=language%3Ath^25+messageid%3A%22MediaWiki%3AAbusefilter-changeslist-examine%22^10+%22examine%22)

yielded wrong results, while searching via search box

(for example, language:th^25 messageid:"MediaWiki:Abusefilter-changeslist-examine"^10 "examine")

yielded correct results.

Even worse, now (July 25, 2014), both ways yield wrong results!


Version: master
Severity: normal

Details

Reference
bz68518

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:30 AM
bzimport set Reference to bz68518.
bzimport added a subscriber: Unknown Object (MLST).

translatewiki.net is no longer using Solr since https://gerrit.wikimedia.org/r/#/c/145437/ (cf. bug 52993 - Add support for ElasticSearch backend for ttmserver).

I confirm my two examples on [[gerrit:94064]] don't work any longer. Niklas, is that syntax supposed to work with the new scheme, or does it still need to be reimplemented?

It has not been implemented for ES. It is possible to implement it with some manual query parsing as we don't expose the full query syntax with ES.

Removing from MW-1.24-release because this isn't going to be fixed in the next few months' worth of security point releases.

We don't seem to have a patch for this yet, though there is https://gerrit.wikimedia.org/r/#/c/196140/5 which is related.

af8fac79b16b026387d74ec9cbbed26aba3b87a1 was merged, but it does not work well enough with partial message key matches which is the whole point of the search (we don't always know the message key): https://translatewiki.net/w/i.php?title=Special%3ASearchTranslations&query=entitydata-unsupported-format doesn't quite find wikibase-entitydata-unsupported-format though of course it's a case lucky enough to work with full text https://translatewiki.net/w/i.php?title=Special%3ASearchTranslations&query=The+data+format+%241+is+not+supported+by+this+interface.++entitydata-unsupported-format

Nemo_bis claimed this task.

Niklas thinks that the full text search is enough and that prefixed message keys are rare.