Page MenuHomePhabricator

Display translated page title in search results
Open, MediumPublic

Description

Hi,

We discussed with one user on this topic : https://www.mediawiki.org/wiki/Topic:T309ediwdcwhm1nn, and we couldn't find how to do this :

When using Translate extension, we have the possibility to translate page title. But when you try to search for this title, you only have "Nom page/en" for instance for a page translated in English, instead of the page name.

Is it possible to have an option to display translated title in the search results ?

Event Timeline

I saw something interesting in this post, for whoever might be interested in implementing this:
https://www.mediawiki.org/wiki/Topic:Sriim4n0ku6apszw

You can use the

{{Translations:Page name/Page display title{{#translation:}}}}

model, to get the translated page title if it exists.

While mostly a hack, the most direct method to deal with this would be some integration to make redirects from the translated name to the actual page.

The display title is also available in the database in page props. Doing redirects has the usual issue of name conflicts between languages and possible "violations" of doing cross namespace redirects if the namespaces names are also translated.

Change 460958 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/core@master] [WIP] Include display title in search results

https://gerrit.wikimedia.org/r/460958

Change 460959 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Add display_title to mappings and start indexing it

https://gerrit.wikimedia.org/r/460959

Change 460960 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] [WIP] Search against the display_title property

https://gerrit.wikimedia.org/r/460960

Change 460991 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Add display_title to mappings

https://gerrit.wikimedia.org/r/460991

This is now blocked until roughly december waiting for data to populate the indices before it can be used

This should be about ready to be unblocked (timeline is right, we can't actually check how many pages have display_title currently, since it's not in the mappings). Deploying this requires an in-place reindex across all wikis which can take a week to run. For this reason we should try and coordinate this with any other mapping changes that need to go out.

Last step before deploy:

Deployment:

Is there any progress on searching and displaying the displaytitle in Cirrus? Over here, we're dealing with page titles that cannot be represented in a regular wiki page title, like Gl=v, 1+1+1+1+1+1+1+1+1+1+1+1, about: Saint Luke Drawing the Virgin, or ]...[world]...[ — just your regular titles for digital artworks. 😉 If users cannot search for those, or on the search results page the titles are different, much confusion can be expected.

Removing task assignee due to inactivity, as this open task has been assigned to the same person for more than two years (see the emails sent to the task assignee on Oct27 and Nov23). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)

Change 460958 abandoned by Ebernhardson:

[mediawiki/core@master] Include display title in search results

Reason:

from 2018, not mergable any more. If desired should be redone

https://gerrit.wikimedia.org/r/460958

Physikerwelt subscribed.
This comment was removed by Physikerwelt.

See also the Search Suggestion using DisplayTitle topic Here it is about the ability to search for Page ID123654789 with the display title John Doe. Yeah, this will indeed be nice to have.

See also the Search Suggestion using DisplayTitle topic Here it is about the ability to search for Page ID123654789 with the display title John Doe. Yeah, this will indeed be nice to have.

Related - we should make sure if there is a translated DisplayTitle, search defers to that vs. non-translated PageTitle of a page otherwise setup for translation.

Examples: