Difference between #12 and #13 of
Adding search to Yii blog example (using Zend Lucene)

Revision #13 has been created by dckurushin on Oct 12, 2011, 12:45:08 PM with the memo:

highlightMatches possible issue
« previous (#12) next (#14) »

Changes

Title unchanged

Adding search to Yii blog example (using Zend Lucene)

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

blog, demo, search, zend, zf, lucene, tutorial

Content changed

[...]
<?php else: ?>
<p class="error">No results matched your search terms.</p>
<?php endif; ?>
```

As you can see because I passed to the view the $query, I can use Zend's highlightMatches ...
<br> (if your search results not in english, you might have some encoding issues with highlightMatches), so you might consider using your own highlighter for greater flexibility and encoding issues free)<br> 
Also I created a real link from the linked I passed and created via
**$doc->addField(Zend_Search_Lucene_Field::Text('link' ...**

And thats it
try to search the word "it"
[...]
29 1
47 followers
Viewed: 77 153 times
Version: 1.1
Category: Tutorials
Written by: dckurushin
Last updated by: klammeraffe
Created on: Oct 7, 2011
Last updated: 5 years ago
Update Article

Revisions

View all history