Answer the question
In order to leave comments, you need to log in
Why is the zf2 lucene backlight not working?
Hello!
Searching with Lucene:
setlocale(LC_ALL, 'ru_RU.UTF-8');
Lucene\Analysis\Analyzer\Analyzer::setDefault(
new Lucene\Analysis\Analyzer\Common\Utf8\CaseInsensitive());
$index = Lucene\Lucene::open($searchIndexLocation);
$searchResults = $index->find($validatedQuery['searchQuery']);
\ZendSearch\Lucene\Search\QueryParser::setDefaultEncoding('UTF-8');
$doc = Html::loadHTML($high, false, $defaultEncoding = 'UTF-8');
$doc->highlight($validatedQuery['searchQuery'], $colour = '#66ffff');
$highlightedHTML=$doc->getHTMLBody();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question