It's an internal abstract class intended to finalize ase a query processing after query parsing.

This type of query is not actually involved into query execution.

category Zend
package Zend_Search_Lucene
subpackage Search
internal
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Search_Lucene_Search_Query_Preprocessing

 Methods

Class constructor. Create a new preprocessing object for prase query.

__construct(string $phrase, string $phraseEncoding, string $fieldName) 

Parameters

$phrase

string

Phrase to search.

$phraseEncoding

string

Phrase encoding.

$fieldName

string

Field name.

Print a query

__toString() : string

Returns

string

Print a query

__toString() : string
Inherited

Returns

string

Constructs an appropriate Weight implementation for this query.

createWeight(\Zend_Search_Lucene_Interface $reader) : \Zend_Search_Lucene_Search_Weight
Inherited

Parameters

$reader

\Zend_Search_Lucene_Interface

Returns

\Zend_Search_Lucene_Search_Weight

Execute query in context of index reader It also initializes necessary internal structures

execute(\Zend_Search_Lucene_Interface $reader, \Zend_Search_Lucene_Index_DocsFilter|null $docsFilter = null
Inherited

Query specific implementation

Parameters

$reader

\Zend_Search_Lucene_Interface

$docsFilter

\Zend_Search_Lucene_Index_DocsFilternull

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.

getBoost() : float
Inherited

Returns

float

Return query terms

getQueryTerms() : array
Inherited

Returns

array

Get slop

getSlop() : integer

Returns

integer

Highlight matches in $inputHTML

highlightMatches(string $inputHTML, string $defaultEncoding = '', \Zend_Search_Lucene_Search_Highlighter_Interface|null $highlighter = null) : string
Inherited

Parameters

$inputHTML

string

$defaultEncoding

string

HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag.

$highlighter

\Zend_Search_Lucene_Search_Highlighter_Interfacenull

Returns

string

Highlight matches in $inputHtmlFragment and return it (without HTML header and body tag)

htmlFragmentHighlightMatches(string $inputHtmlFragment, string $encoding = 'UTF-8', \Zend_Search_Lucene_Search_Highlighter_Interface|null $highlighter = null) : string
Inherited

Parameters

$inputHtmlFragment

string

$encoding

string

Input HTML string encoding

$highlighter

\Zend_Search_Lucene_Search_Highlighter_Interfacenull

Returns

string

Get document ids likely matching the query

matchedDocs() : array
Inherited

It's an array with document ids as keys (performance considerations)

Returns

array

Optimize query in the context of specified index

optimize(\Zend_Search_Lucene_Interface $index) : \Zend_Search_Lucene_Search_Query
Inherited

Parameters

$index

\Zend_Search_Lucene_Interface

Returns

\Zend_Search_Lucene_Search_Query

Reset query, so it can be reused within other queries or with other indeces

reset() 
Inherited

Re-write query into primitive queries in the context of specified index

rewrite(\Zend_Search_Lucene_Interface $index) : \Zend_Search_Lucene_Search_Query

Parameters

$index

\Zend_Search_Lucene_Interface

Returns

\Zend_Search_Lucene_Search_Query

Re-write query into primitive queries in the context of specified index

rewrite(\Zend_Search_Lucene_Interface $index) : \Zend_Search_Lucene_Search_Query
Inherited

Parameters

$index

\Zend_Search_Lucene_Interface

Returns

\Zend_Search_Lucene_Search_Query

Score specified document

score(integer $docId, \Zend_Search_Lucene_Interface $reader) : float
Inherited

Parameters

$docId

integer

$reader

\Zend_Search_Lucene_Interface

Returns

float

Sets the boost for this query clause to $boost.

setBoost(float $boost) 
Inherited

Parameters

$boost

float

Set slop

setSlop(integer $slop) 

Parameters

$slop

integer

Query specific matches highlighting

_highlightMatches(\Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) 

Parameters

$highlighter

\Zend_Search_Lucene_Search_Highlighter_Interface

Highlighter object (also contains doc for highlighting)

Query specific matches highlighting

_highlightMatches(\Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) 
Inherited

Parameters

$highlighter

\Zend_Search_Lucene_Search_Highlighter_Interface

Highlighter object (also contains doc for highlighting)

Constructs an initializes a Weight for a _top-level_query_.

_initWeight(\Zend_Search_Lucene_Interface $reader) 
Inherited

Parameters

$reader

\Zend_Search_Lucene_Interface

 Properties

 

Matched terms.

$_matches : array

Default

null

Matched terms list. It's filled during rewrite operation and may be used for search result highlighting

Array of Zend_Search_Lucene_Index_Term objects

 

Query weight

$_weight : \Zend_Search_Lucene_Search_Weight

Default

null
 

query boost factor

$_boost : float

Default

1
 

Current highlight color

$_currentColorIndex : integer

Default

0
 

Field name.

$_field : string

Default

 

Phrase to find.

$_phrase : string

Default

 

Phrase encoding (field name is always provided using UTF-8 encoding since it may be retrieved from index).

$_phraseEncoding : string

Default

 

Sets the number of other words permitted between words in query phrase.

$_slop : integer

Default

If zero, then this is an exact phrase search. For larger values this works like a WITHIN or NEAR operator.

The slop is in fact an edit-distance, where the units correspond to moves of terms in the query phrase out of position. For example, to switch the order of two words requires two moves (the first move places the words atop one another), so to permit re-orderings of phrases, the slop must be at least two. More exact matches are scored higher than sloppier matches, thus search results are sorted by exactness.

The slop is zero by default, requiring exact matches.