category Zend
package Zend_Search_Lucene
subpackage Search
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Get document for highlighting.

getDocument() : \Zend_Search_Lucene_Document_Html
inherited_from \Zend_Search_Lucene_Search_Highlighter_Interface::getDocument()

Returns

\Zend_Search_Lucene_Document_Html$document

Highlight specified words

highlight(string|array $words) 
inherited_from \Zend_Search_Lucene_Search_Highlighter_Interface::highlight()

Parameters

$words

stringarray

Words to highlight. They could be organized using the array or string.

Set document for highlighting.

setDocument(\Zend_Search_Lucene_Document_Html $document) 
inherited_from \Zend_Search_Lucene_Search_Highlighter_Interface::setDocument()

Parameters

$document

\Zend_Search_Lucene_Document_Html

 Properties

 

Index of current color for highlighting

$_currentColorIndex : integer

Default

0

Index is increased at each highlight() call, so terms matching different queries are highlighted using different colors.

 

HTML document for highlighting

$_doc : \Zend_Search_Lucene_Document_Html

Default

 

List of colors for text highlighting

$_highlightColors : array

Default

array('#66ffff', '#ff66ff', '#ffff66', '#ff8888', '#88ff88', '#8888ff', '#88dddd', '#dd88dd', '#dddd88', '#aaddff', '#aaffdd', '#ddaaff', '#ddffaa', '#ffaadd', '#ffddaa')