Page MenuHomePhabricator

Special:Search doesn't use labels and descriptions for suggestions but just the item ID
Closed, ResolvedPublic

Description

The search box on Special:Search only uses the "traditional" method of search suggestions; that is, only pages with page titles starting with the inputted text. So, if we type Q1234 (without pressing enter or clicking the "Search" button to the right of the box) the suggester field will show Q123, Q1234566, Q1235466 ect", the item's label is not shown, and the page title is shown instead. Note that since using this "broken" search box is currently the only effective way to search outside the main space, it might make sense to not fix this bug until T48251 is fixed.

Event Timeline

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

I am not sure I understand this bug. When I go to https://www.wikidata.org/wiki/Special:Search and search for "foo" I get a bunch of results as I would expect.

Can you please clarify?

The "search suggestions" I'm referring to are those that appear in the small box below the input field while typing. If you type in "Foo" (without pressing enter or clicking the "Search" button) into the box, there are no suggestions immediately given below the box. If you type "Q123" into the box (again, without pressing enter or clicking the "Search" button to the right of the box), it gives various items beginning with "Q123", such as "Q12378080" and so on.

Ok now I understand it. Thanks.

This search field currently doesn't use the entity suggester and therefore doesn't know about labels and aliases.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher changed the task status from Open to Stalled.Apr 23 2017, 4:09 PM
Lydia_Pintscher lowered the priority of this task from Medium to Low.

This should be solved after we have better cirrus integration.

I am not sure what should be done with this, but I think we have the infrastructure now, should we resurrect it?

Lydia_Pintscher changed the task status from Stalled to Open.Apr 3 2018, 6:45 PM

Yay! And yeah but it doesn't seem high priority.

Looks like this is driven by opensearch API which returns only titles (Q-ids) but not either labels or descriptions for wikidata items. Need to check how hard would it be to make the search return them.

Change 468084 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[mediawiki/extensions/Wikibase@master] Generate Opensearch descriptions for Wikibase entities.

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

Smalyshev moved this task from In review to Backlog on the User-Smalyshev board.

Change 468084 abandoned by Smalyshev:
Generate Opensearch descriptions for Wikibase entities.

Reason:
the search code moved to WikibaseCirrusSearch

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

Change 504226 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[mediawiki/extensions/WikibaseCirrusSearch@master] Generate Opensearch descriptions for Wikibase entities.

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

Change 504226 merged by jenkins-bot:
[mediawiki/extensions/WikibaseCirrusSearch@master] Generate Opensearch descriptions for Wikibase entities.

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

UI widget can display descriptions, but this is controlled by option showDescriptions which we do not enable. The setup is controlled by SearchFormWidget class which has it hardcoded. So we need to figure out how to toggle this option only on Wikidata.

Change 511325 had a related patch set uploaded (by Jforrester; owner: Smalyshev):
[mediawiki/core@master] Enable configuration to supply options for Special:Search form

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

Change 512802 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[operations/mediawiki-config@master] Enable wgSpecialSearchFormOptions on beta

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

Change 512979 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[operations/mediawiki-config@master] Enable wgSpecialSearchFormOptions on testwikidata

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

Change 512989 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[operations/mediawiki-config@master] Enable wgSpecialSearchFormOptions on production Wikidata

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

Change 512802 merged by jenkins-bot:
[operations/mediawiki-config@master] Enable wgSpecialSearchFormOptions on beta

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

Change 512979 merged by jenkins-bot:
[operations/mediawiki-config@master] Enable wgSpecialSearchFormOptions on testwikidata

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

Mentioned in SAL (#wikimedia-operations) [2019-05-28T23:02:39Z] <jforrester@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT T55652 Enable wgSpecialSearchFormOptions on testwikidata (duration: 00m 56s)

Change 512989 merged by jenkins-bot:
[operations/mediawiki-config@master] Enable wgSpecialSearchFormOptions on production Wikidata

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

Mentioned in SAL (#wikimedia-operations) [2019-05-29T23:10:16Z] <jforrester@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT Enable wgSpecialSearchFormOptions on production Wikidata T55652 (duration: 00m 57s)

Smalyshev moved this task from Doing to Done on the User-Smalyshev board.
Smalyshev added a subscriber: Lea_Lacroix_WMDE.

Deployed now.
@Lea_Lacroix_WMDE you may want to add it to the weekly summaries.