Last modified: 2012-11-28 14:02:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43580, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41580 - Search results show the label twice, but not the item description.
Search results show the label twice, but not the item description.
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-31 10:59 UTC by Daniel Kinzler
Modified: 2012-11-28 14:02 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2012-10-31 10:59:33 UTC
The excerpt shown on search results shows item labels twice. It would be more useful to see the item description (aka tag line) there.
Comment 1 Daniel Kinzler 2012-11-06 13:19:17 UTC
It's not showing the label twice, it's looking at getTextForSearchIndex() and highlighting the first two occurrences of the search term. The description doesn't come into this at all.

We'll need new hooks in core to solve this, plus possibly more functionality in the Content class.
Comment 2 Daniel Kinzler 2012-11-06 13:19:48 UTC
Partial fix provided by I9158684b together with I75a78293: this will show the description along with the label and the ID. Showing better excerpts is still pending.
Comment 3 Daniel Kinzler 2012-11-06 13:30:53 UTC
Thinking about it, the above fix should be good enough for now. It removes the spurious excerpts and shows the description. 

Showing excerpts from items may be nice for phase two, but that's a separate feature request.
Comment 4 Daniel Kinzler 2012-11-06 15:16:19 UTC
Oops, forgot to submit my last update, useless extracts are still show. Follow-up fix: I29074acf
Comment 5 tobias.gritschacher 2012-11-08 13:27:26 UTC
Now if you search for an alias you don't see that alias in the search results which is confusing because you don't know why the specific item was found.
Comment 6 tobias.gritschacher 2012-11-08 13:28:43 UTC
Selenium tests are failing bacause of this. I'm going to remove the lines which check if the actual search term is displayed in the search results.
Comment 7 Daniel Kinzler 2012-11-08 22:33:04 UTC
@tobias: good point. there's already a TODO in the code for showing something meaningful there, but maybe we should have a ticket open for "show context of matching search terms in search result". The problem is that in the past, the text that was used for highlighting was just a list of all the labels, descriptions, aliases and site link targets, without any real context. Just the terms. That's not really helpful, and looks confusing; typically it would just show the search term twice, without any actual context. I'm not sure what the context should really look like... should it say something like "Dutch Alias: Foo", or "Link to German Wikipedia: Baar"? That would be nice, but it's not trivial to do (though the code could be re-used to show nicer context for diffs too: "German Descripion" instead of "description/de").

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links