--- Comment #1 from Nik Everett <neverett+bugzi...@wikimedia.org> ---
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.
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list