I use symfony 1.4 and I use Zend Lucene search like in Jobbet And I need to make Search Results Highlighting, I read this , but I do not understend how it make in my case with symfony(
$ highlightedHTML = $ query-> highlightMatches ($sourceHTML);
What is $sourceHTML? And is it all makes by only one row?
upd:
$ highlightedHTML = $ query-> highlightMatches ($sourceHTML);
It works in my model, but how it implement in my view?
I do not now , if it is right , but it is work :) Just in view:
$query = Zend_Search_Lucene_Search_QueryParser::parse($queryStr);
$highlightedHTML = $query->highlightMatches($sourceHTML);
In my case for example:
echo $query->highlightMatches($ad->getCompany())