\Zend_Search_Lucene_Search_Query_Phrase
A Query that matches documents containing a particular sequence of terms.
- Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Search_Lucene_Search_Query_Phrase
extends Zend_Search_Lucene_Search_Query
{
- // members
- private $_terms;
- private $_offsets;
- private $_slop;
- private $_resVector = NULL;
- private array $_termsPositions = ;
- // Inherited members from Zend_Search_Lucene_Search_Query
- protected Zend_Search_Lucene_Search_Weight $_weight;
- // methods
- public void __construct()
- public void setSlop()
- public integer getSlop()
- public void addTerm()
- public Zend_Search_Lucene_Search_Query rewrite()
- public Zend_Search_Lucene_Search_Query optimize()
- public array getTerms()
- public void setWeight()
- public Zend_Search_Lucene_Search_Weight createWeight()
- public float _exactPhraseFreq()
- public float _sloppyPhraseFreq()
- public void execute()
- public array matchedDocs()
- public float score()
- public array getQueryTerms()
- protected void _highlightMatches()
- public string __toString()
- // Inherited methods from Zend_Search_Lucene_Search_Query
- public float getBoost()
- public void setBoost()
- public abstract float score()
- public abstract array matchedDocs()
- public abstract void execute()
- public abstract Zend_Search_Lucene_Search_Weight createWeight()
- protected void _initWeight()
- public abstract Zend_Search_Lucene_Search_Query rewrite()
- public abstract Zend_Search_Lucene_Search_Query optimize()
- public void reset()
- public abstract string __toString()
- public abstract array getQueryTerms()
- protected abstract void _highlightMatches()
- public string highlightMatches()
- public string htmlFragmentHighlightMatches()
Hierarchy
Extends
Members
private
- $_offsets
—
array
Term positions (relative positions of terms within the phrase). - $_resVector
—
array
Result vector. - $_slop
—
integer
Sets the number of other words permitted between words in query phrase. - $_terms
—
array
Terms to find. - $_termsPositions
—
array
Terms positions vectors.
protected
- $_weight
—
Zend_Search_Lucene_Search_Weight
Query weight
Methods
protected
- _highlightMatches() — Query specific matches highlighting
public
- __construct() — Class constructor. Create a new prase query.
- __toString() — Print a query
- _exactPhraseFreq() — Score calculator for exact phrase queries (terms sequence is fixed)
- _sloppyPhraseFreq() — Score calculator for sloppy phrase queries (terms sequence is fixed)
- addTerm() — Adds a term to the end of the query phrase.
- createWeight() — Constructs an appropriate Weight implementation for this query.
- execute() — Execute query in context of index reader It also initializes necessary internal structures
- getQueryTerms() — Return query terms
- getSlop() — Get slop
- getTerms() — Returns query term
- matchedDocs() — Get document ids likely matching the query
- optimize() — Optimize query in the context of specified index
- rewrite() — Re-write query into primitive queries in the context of specified index
- score() — Score specified document
- setSlop() — Set slop
- setWeight() — Set weight for specified term
Inherited from Zend_Search_Lucene_Search_Query
protected
- _highlightMatches() — Query specific matches highlighting
- _initWeight() — Constructs an initializes a Weight for a _top-level_query_.
public
- __toString() — Print a query
- createWeight() — Constructs an appropriate Weight implementation for this query.
- execute() — Execute query in context of index reader It also initializes necessary internal structures
- getBoost() — Gets the boost for this clause. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by boost. The boost is 1.0 by default.
- getQueryTerms() — Return query terms
- highlightMatches() — Highlight matches in $inputHTML
- htmlFragmentHighlightMatches() — Highlight matches in $inputHtmlFragment and return it (without HTML header and body tag)
- matchedDocs() — Get document ids likely matching the query
- optimize() — Optimize query in the context of specified index
- reset() — Reset query, so it can be reused within other queries or with other indeces
- rewrite() — Re-write query into primitive queries in the context of specified index
- score() — Score specified document
- setBoost() — Sets the boost for this query clause to $boost.