Issues

ZF-4115: Zend_Search_Lucene should offer hightlight() method to hightlight any string. Without DOM.

Description

When using Lucene, I usualy need to hightlight the search therms ONLY in the actual text gathered from query hit. Now the highlightMatches() method expects me to input the whole bunch of HTML including header. Otherwise it can't make the UTF-8 encoding work...

Returning error message: Warning: DOMDocument::saveHTML(): output conversion failed due to conv error in /srv/.../www/web/library/Zend/Search/Lucene/Document/Html.php on line 339 Warning: DOMDocument::saveHTML(): Bytes: 0x83 0xC2 0xAD 0x20 in /srv/.../www/web/library/Zend/Search/Lucene/Document/Html.php on line 339

Comments

Done.

Zend_Search_Lucene_Search_Query class has an additional htmlFragmentHighlightMatches() method now.

encoding also can be specified separately using optional parameters of highlightMatches() and htmlFragmentHighlightMatches() methods.