## Zend_Search_Lucene_Search_Query_Phrase

Description

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

- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Search/Lucene/Search/Query/Phrase.php (line 43)

    Zend_Search_Lucene_Search_Query
       |
       --Zend_Search_Lucene_Search_Query_Phrase

Method Summary
Zend_Search_Lucene_Search_Query_Phrase __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, Zend_Search_Lucene $reader)
void setSlop (integer $slop)
void setWeight (integer $num, Zend_Search_Lucene_Search_Weight_Term $weight)
Zend_Search_Lucene_Search_Weight _createWeight (Zend_Search_Lucene $reader)
float _exactPhraseFreq (integer $docId)
float _sloppyPhraseFreq (integer $docId, Zend_Search_Lucene $reader)
Variables

#### Inherited Variables

Inherited from Zend_Search_Lucene_Search_Query

> Zend_Search_Lucene_Search_Query::$_weight

Methods
Constructor __construct (line 107)

Class constructor. Create a new prase query.

- access: public
- throws: Zend_Search_Lucene_Exception

Zend_Search_Lucene_Search_Query_Phrase __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 169)

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])

- Zend_Search_Lucene_Index_Term $term
- integer $position

getSlop (line 155)

Get slop

- access: public

integer getSlop ()
getTerms (line 191)

Returns query term

- access: public

array getTerms ()
score (line 388)

Score specified document

- access: public

float score (integer $docId, Zend_Search_Lucene $reader)

- integer $docId
- Zend_Search_Lucene $reader

Redefinition of:

Zend_Search_Lucene_Search_Query::score()
  Score specified document

setSlop (line 144)

Set slop

- access: public

void setSlop (integer $slop)

- integer $slop

setWeight (line 203)

Set weight for specified term

- access: public

void setWeight (integer $num, Zend_Search_Lucene_Search_Weight_Term $weight)

- integer $num
- Zend_Search_Lucene_Search_Weight_Term $weight

_createWeight (line 215)

Constructs an appropriate Weight implementation for this query.

- access: protected

Zend_Search_Lucene_Search_Weight _createWeight (Zend_Search_Lucene $reader)

- Zend_Search_Lucene $reader

Redefinition of:

Zend_Search_Lucene_Search_Query::_createWeight()
  Constructs an appropriate Weight implementation for this query.

_exactPhraseFreq (line 265)

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

- access: public

float _exactPhraseFreq (integer $docId)

- integer $docId

_sloppyPhraseFreq (line 311)

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

- access: public

float _sloppyPhraseFreq (integer $docId, Zend_Search_Lucene $reader)

- integer $docId
- Zend_Search_Lucene $reader

#### Inherited Methods

Inherited From Zend_Search_Lucene_Search_Query

> Zend_Search_Lucene_Search_Query::getBoost()
> Zend_Search_Lucene_Search_Query::score()
> Zend_Search_Lucene_Search_Query::setBoost()
> Zend_Search_Lucene_Search_Query::_createWeight()
> Zend_Search_Lucene_Search_Query::_initWeight()

Documentation generated on Tue, 11 Jul 2006 12:17:54 -0500 by phpDocumentor 1.3.0RC6