Zend Framework
1.12
|
Public Member Functions | |
__construct ($terms=null, $offsets=null, $field=null) | |
Class constructor. | |
setSlop ($slop) | |
Set slop. | |
getSlop () | |
Get slop. | |
addTerm (Zend_Search_Lucene_Index_Term $term, $position=null) | |
Adds a term to the end of the query phrase. | |
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. | |
getTerms () | |
Returns query term. | |
setWeight ($num, $weight) | |
Set weight for specified term. | |
createWeight (Zend_Search_Lucene_Interface $reader) | |
Constructs an appropriate Weight implementation for this query. | |
_exactPhraseFreq ($docId) | |
Score calculator for exact phrase queries (terms sequence is fixed) | |
_sloppyPhraseFreq ($docId, Zend_Search_Lucene_Interface $reader) | |
Score calculator for sloppy phrase queries (terms sequence is fixed) | |
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. | |
__toString () | |
Print a 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. | |
![]() | |
_initWeight (Zend_Search_Lucene_Interface $reader) | |
Constructs an initializes a Weight for a _top-level_query_. | |
_highlightMatches (Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) | |
Query specific matches highlighting. | |
Additional Inherited Members | |
![]() | |
$_weight = null | |
__construct | ( | $terms = null , |
|
$offsets = null , |
|||
$field = null |
|||
) |
Class constructor.
Create a new prase query.
string | $field | Field to search. |
array | $terms | Terms to search Array of strings. |
array | $offsets | Relative term positions. Array of integers. |
Zend_Search_Lucene_Exception |
__toString | ( | ) |
Print a query.
_exactPhraseFreq | ( | $docId | ) |
Score calculator for exact phrase queries (terms sequence is fixed)
integer | $docId |
|
protected |
Query specific matches highlighting.
Zend_Search_Lucene_Search_Highlighter_Interface | $highlighter | Highlighter object (also contains doc for highlighting) |
_sloppyPhraseFreq | ( | $docId, | |
Zend_Search_Lucene_Interface | $reader | ||
) |
Score calculator for sloppy phrase queries (terms sequence is fixed)
integer | $docId | |
Zend_Search_Lucene_Interface | $reader |
addTerm | ( | Zend_Search_Lucene_Index_Term | $term, |
$position = null |
|||
) |
Adds a term to the end of the query phrase.
The relative position of the term is specified explicitly or the one immediately after the last term added.
Zend_Search_Lucene_Index_Term | $term | |
integer | $position |
createWeight | ( | Zend_Search_Lucene_Interface | $reader | ) |
Constructs an appropriate Weight implementation for this query.
Zend_Search_Lucene_Interface | $reader |
execute | ( | Zend_Search_Lucene_Interface | $reader, |
$docsFilter = null |
|||
) |
Execute query in context of index reader It also initializes necessary internal structures.
Zend_Search_Lucene_Interface | $reader | |
Zend_Search_Lucene_Index_DocsFilter | null | $docsFilter |
This code is used as workaround for array_intersect_key() slowness problem.
getQueryTerms | ( | ) |
Return query terms.
getSlop | ( | ) |
Get slop.
getTerms | ( | ) |
Returns query term.
matchedDocs | ( | ) |
Get document ids likely matching the query.
It's an array with document ids as keys (performance considerations)
optimize | ( | Zend_Search_Lucene_Interface | $index | ) |
Optimize query in the context of specified index.
Zend_Search_Lucene_Interface | $index |
rewrite | ( | Zend_Search_Lucene_Interface | $index | ) |
Re-write query into primitive queries in the context of specified index.
Zend_Search_Lucene_Interface | $index |
score | ( | $docId, | |
Zend_Search_Lucene_Interface | $reader | ||
) |
setSlop | ( | $slop | ) |
Set slop.
integer | $slop |
setWeight | ( | $num, | |
$weight | |||
) |
Set weight for specified term.
integer | $num | |
Zend_Search_Lucene_Search_Weight_Term | $weight |