Zend Framework  1.12
Public Member Functions | Protected Member Functions | List of all members
Zend_Search_Lucene_Search_Query_Preprocessing_Phrase Class Reference

Public Member Functions

 __construct ($phrase, $phraseEncoding, $fieldName)
 Class constructor.
 
 setSlop ($slop)
 Set slop.
 
 getSlop ()
 Get slop.
 
 rewrite (Zend_Search_Lucene_Interface $index)
 Re-write query into primitive queries in the context of specified index.
 
 __toString ()
 Print a query.
 
- Public Member Functions inherited from Zend_Search_Lucene_Search_Query_Preprocessing
 optimize (Zend_Search_Lucene_Interface $index)
 Optimize query in the context of specified index.
 
 createWeight (Zend_Search_Lucene_Interface $reader)
 Constructs an appropriate Weight implementation for this query.
 
 execute (Zend_Search_Lucene_Interface $reader, $docsFilter=null)
 Execute query in context of index reader It also initializes necessary internal structures.
 
 matchedDocs ()
 Get document ids likely matching the query.
 
 score ($docId, Zend_Search_Lucene_Interface $reader)
 Score specified document.
 
 getQueryTerms ()
 Return query terms.
 
- Public Member Functions inherited from Zend_Search_Lucene_Search_Query
 getBoost ()
 Gets the boost for this clause.
 
 setBoost ($boost)
 Sets the boost for this query clause to $boost.
 
 score ($docId, Zend_Search_Lucene_Interface $reader)
 Score specified document.
 
 matchedDocs ()
 Get document ids likely matching the query.
 
 execute (Zend_Search_Lucene_Interface $reader, $docsFilter=null)
 Execute query in context of index reader It also initializes necessary internal structures.
 
 createWeight (Zend_Search_Lucene_Interface $reader)
 Constructs an appropriate Weight implementation for this query.
 
 rewrite (Zend_Search_Lucene_Interface $index)
 Re-write query into primitive queries in the context of specified index.
 
 optimize (Zend_Search_Lucene_Interface $index)
 Optimize query in the context of specified index.
 
 reset ()
 Reset query, so it can be reused within other queries or with other indeces.
 
 __toString ()
 Print a query.
 
 getQueryTerms ()
 Return query terms.
 
 highlightMatches ($inputHTML, $defaultEncoding= '', $highlighter=null)
 Highlight matches in $inputHTML.
 
 htmlFragmentHighlightMatches ($inputHtmlFragment, $encoding= 'UTF-8', $highlighter=null)
 Highlight matches in $inputHtmlFragment and return it (without HTML header and body tag)
 

Protected Member Functions

 _highlightMatches (Zend_Search_Lucene_Search_Highlighter_Interface $highlighter)
 Query specific matches highlighting.
 

Additional Inherited Members

- Protected Attributes inherited from Zend_Search_Lucene_Search_Query_Preprocessing
 $_matches = null
 

Constructor & Destructor Documentation

__construct (   $phrase,
  $phraseEncoding,
  $fieldName 
)

Class constructor.

Create a new preprocessing object for prase query.

Parameters
string$phrasePhrase to search.
string$phraseEncodingPhrase encoding.
string$fieldNameField name.

Member Function Documentation

__toString ( )

Print a query.

Returns
string
_highlightMatches ( Zend_Search_Lucene_Search_Highlighter_Interface  $highlighter)
protected

Query specific matches highlighting.

Parameters
Zend_Search_Lucene_Search_Highlighter_Interface$highlighterHighlighter object (also contains doc for highlighting)

Skip fields detection. We don't need it, since we expect all fields presented in the HTML body and don't differentiate them

Skip exact term matching recognition, keyword fields highlighting is not supported

Skip wildcard queries recognition. Supported wildcards are removed by text analyzer

getSlop ( )

Get slop.

Returns
integer
rewrite ( Zend_Search_Lucene_Interface  $index)

Re-write query into primitive queries in the context of specified index.

Parameters
Zend_Search_Lucene_Interface$index
Returns
Zend_Search_Lucene_Search_Query
setSlop (   $slop)

Set slop.

Parameters
integer$slop