Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Plugins
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jun 2016 at 15:07 UTC
Updated:
29 Jun 2016 at 09:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
nikolabintev commentedComment #3
nikolabintev commentedHere is my patch.
Comment #4
miroslavbanov commentedComment #5
miroslavbanov commentedTo reproduce:
If you have a single word in the field, and you search for it, it can't be highlighted.
Use case:
Indexing "Link Title" - it's rarely long text. Using just one word is very likely.
Compared to this, Apachesolr parameter 'hl=true' would highlight the text. So this is inconsistent with Apachesolr snippets.
Comment #6
drunken monkeyThanks for reporting this problem! Your explanation makes sense. However, Wouldn't it also be possible to just add spaces in addition to the newlines? See the attached patch.
It seems to me there might have been a reason to use newlines, and if so, this should preserve that use.
If this patch works for you, too, I'll commit it.
Comment #7
miroslavbanov commented#6 works just as well
Comment #8
nikolabintev commented#6 works for me as well
Comment #10
drunken monkeyOK, great. Thanks for reviewing!
Committed.
Thanks again, everyone!