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

 Methods

Context object constructor

__construct(string $encoding, string|null $defaultField = null

Parameters

$encoding

string

$defaultField

stringnull

Generate 'signs style' query from the context '+term1 term2 -term3 +(<subquery1>) .

_signStyleExpressionQuery() : \Zend_Search_Lucene_Search_Query

..'

Returns

\Zend_Search_Lucene_Search_Query

Add entry to a query

addEntry(\Zend_Search_Lucene_Search_QueryEntry $entry) 

Parameters

$entry

\Zend_Search_Lucene_Search_QueryEntry

Process logical operator

addLogicalOperator(integer $operator) 

Parameters

$operator

integer

Set boost factor to the entry

boost(float $boostFactor) 

Parameters

$boostFactor

float

Get context default field

getField() : string | null

Returns

stringnull

Generate query from current context

getQuery() : \Zend_Search_Lucene_Search_Query

Returns

\Zend_Search_Lucene_Search_Query

Process fuzzy search or proximity search modifier

processFuzzyProximityModifier($parameter = null

Parameters

$parameter

Exceptions

\Zend_Search_Lucene_Search_QueryParserException

Set field for next entry

setNextEntryField(string $field) 

Parameters

$field

string

Set sign for next entry

setNextEntrySign(integer $sign) 

Parameters

$sign

integer

Exceptions

\Zend_Search_Lucene_Exception

Generate 'boolean style' query from the context 'term1 and term2 or term3 and (<subquery1>) and not (<subquery2>)'

_booleanExpressionQuery() : \Zend_Search_Lucene_Search_Query

Exceptions

\Zend_Search_Lucene

Returns

\Zend_Search_Lucene_Search_Query

 Properties

 

Default field for the context.

$_defaultField : string | null

Default

null means, that term should be searched through all fields Zend_Search_Lucene_Search_Query::rewriteQuery($index) transletes such queries to several

 

Query string encoding

$_encoding : string

Default

 

Query entries Each entry is a Zend_Search_Lucene_Search_QueryEntry object or boolean operator (Zend_Search_Lucene_Search_QueryToken class constant)

$_entries : array

Default

array()
 

Grouping mode

$_mode : integer

Default

null
 

Field specified for next entry

$_nextEntryField : string

Default

null
 

True means, that term is required.

$_nextEntrySign : boolean

Default

null

False means, that term is prohibited. null means, that term is neither prohibited, nor required

 

Entries signs.

$_signs : \arrays

Default

array()

Used in GM_SIGNS grouping mode

 Constants

 

GM_BOOLEAN

GM_BOOLEAN = 1 
 

Entries grouping mode

GM_SIGNS = 0