Class ZSearchPhraseQuery

Description

A Query that matches documents containing a particular sequence of terms.

Located in /incubator/Zend/Search/Lucene/search/ZSearchPhraseQuery.php (line 41)

ZSearchQuery
   |
   --ZSearchPhraseQuery
Method Summary
 ZSearchPhraseQuery __construct ([array $terms = null], [array $offsets = null], [string $field = null])
 void addTerm (Zend_Search_Lucene_Index_Term $term, [integer $position = null])
 integer getSlop ()
 array getTerms ()
 float score (integer $docId, ZSearch $reader)
 void setSlop (integer $slop)
 void setWeight (integer $num, ZSearchTermWeight $weight)
 float _exactPhraseFreq (integer $docId)
 float _sloppyPhraseFreq (integer $docId, ZSearch $reader)
Variables

Inherited Variables

Inherited from ZSearchQuery

ZSearchQuery::$_weight
Methods
Constructor __construct (line 105)

Class constructor. Create a new prase query.

  • access: public
  • throws: Zend_Search_Lucene_Exception
ZSearchPhraseQuery __construct ([array $terms = null], [array $offsets = null], [string $field = null])
  • string $field: Field to search.
  • array $terms: Terms to search Array of strings.
  • array $offsets: Relative term positions. Array of integers.
addTerm (line 167)

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.

  • access: public
void addTerm (Zend_Search_Lucene_Index_Term $term, [integer $position = null])
getSlop (line 153)

Get slop

  • access: public
integer getSlop ()
getTerms (line 189)

Returns query term

  • access: public
array getTerms ()
score (line 386)

Score specified document

  • access: public
float score (integer $docId, ZSearch $reader)

Redefinition of:
ZSearchQuery::score()
Score specified document
setSlop (line 142)

Set slop

  • access: public
void setSlop (integer $slop)
  • integer $slop
setWeight (line 201)

Set weight for specified term

  • access: public
void setWeight (integer $num, ZSearchTermWeight $weight)
_createWeight (line 213)

Constructs an appropriate Weight implementation for this query.

  • access: protected
ZSearchWeight _createWeight (ZSearch $reader)

Redefinition of:
ZSearchQuery::_createWeight()
Constructs an appropriate Weight implementation for this query.
_exactPhraseFreq (line 263)

Score calculator for exact phrase queries (terms sequence is fixed)

  • access: public
float _exactPhraseFreq (integer $docId)
  • integer $docId
_sloppyPhraseFreq (line 309)

Score calculator for sloppy phrase queries (terms sequence is fixed)

  • access: public
float _sloppyPhraseFreq (integer $docId, ZSearch $reader)

Inherited Methods

Inherited From ZSearchQuery

 ZSearchQuery::getBoost()
 ZSearchQuery::score()
 ZSearchQuery::setBoost()
 ZSearchQuery::_createWeight()
 ZSearchQuery::_initWeight()

Documentation generated on Wed, 08 Mar 2006 04:56:48 -0800 by phpDocumentor 1.3.0RC4