\Zend_Search_Lucene_Search_Query_MultiTerm
- 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_MultiTerm
extends Zend_Search_Lucene_Search_Query
{
- // members
- private array $_terms = ;
- private $_signs;
- private $_resVector = NULL;
- private array $_termsFreqs = ;
- private $_coord = NULL;
- private array $_weights = ;
- // Inherited members from Zend_Search_Lucene_Search_Query
- protected Zend_Search_Lucene_Search_Weight $_weight;
- // methods
- public void __construct()
- public void addTerm()
- public Zend_Search_Lucene_Search_Query rewrite()
- public Zend_Search_Lucene_Search_Query optimize()
- public array getTerms()
- public array getSigns()
- public void setWeight()
- public Zend_Search_Lucene_Search_Weight createWeight()
- private void _calculateConjunctionResult()
- private void _calculateNonConjunctionResult()
- public float _conjunctionScore()
- public float _nonConjunctionScore()
- 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
Tasks
Line | Task |
---|---|
242 | make an optimization for repeated terms |
Members
private
- $_coord
—
mixed
A score factor based on the fraction of all query terms that a document contains. - $_resVector
—
array
Result vector. - $_signs
—
array
Term signs. - $_terms
—
array
Terms to find. - $_termsFreqs
—
array
Terms positions vectors. - $_weights
—
array
Terms weights array of Zend_Search_Lucene_Search_Weight
protected
- $_weight
—
Zend_Search_Lucene_Search_Weight
Query weight
Methods
private
- _calculateConjunctionResult() — Calculate result vector for Conjunction query (like '+something +another')
- _calculateNonConjunctionResult() — Calculate result vector for non Conjunction query (like '+something -another')
protected
- _highlightMatches() — Query specific matches highlighting
public
- __construct() — Class constructor. Create a new multi-term query object.
- __toString() — Print a query
- _conjunctionScore() — Score calculator for conjunction queries (all terms are required)
- _nonConjunctionScore() — Score calculator for non conjunction queries (not all terms are required)
- addTerm() — Add a $term (Zend_Search_Lucene_Index_Term) to this query.
- 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
- getSigns() — Return terms signs
- 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
- 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.