Last modified: 2014-02-21 23:03:55 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 T61897, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59897 - Only 1 of 2 search terms highlighted
Only 1 of 2 search terms highlighted
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
CirrusSearch (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
https://commons.wikimedia.org/w/index...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-10 08:26 UTC by Raimond Spekking
Modified: 2014-02-21 23:03 UTC (History)
3 users (show)

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


Attachments

Description Raimond Spekking 2014-01-10 08:26:50 UTC
See URL for exact search. In the result list only the second search term "Canada" is highlighted by the first search term "Spekking" (my name) is not visible.

The search result itself is perfect. I expected the first 3 results at least :-)
Comment 1 Nik Everett 2014-01-10 21:51:08 UTC
I think there are two reasons the old search gets this more right:
1.  Elasticsearch doesn't make any special effort to make sure that all search terms appear in the snippet (or snippets) it selects.  I'll have a think about that.  lsearchd doesn't make that effort either but in this case it gets lucky because the search terms only appear once in the wikitext.  In a sense the wikitext is more information dense then the rendered output.  In another sense, though, it throws away lots of information by not rendering templates.  You win some and you lose some.  In this case we lost.
2.  lsearchd performs a neat trick: if it finds two worth while segments then it returns them otherwise it returns one double length segment.  Elasticsearch doesn't have that bit of magic though for what it is worth I've proposed it: https://github.com/elasticsearch/elasticsearch/issues/3776 .  I'm not sure it'd help without #1.

In general you can't expect to get all the terms highlighted _but_ you can tell by playing with google that they've implemented both of these things.

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


Navigation
Links