API Documentation

Zend/Search/Lucene/Search/QueryParserContext.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Search_Lucene  
Subpackage
Search  
Version
$Id: QueryParserContext.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Search_Lucene_Search_QueryParserContext

Package: Zend\Search\Lucene\Search

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  GM_SIGNS = 0

Entries grouping mode

Constant  GM_BOOLEAN = 1

Properties

Propertyprivatestring|null  $_defaultField= ''

Default field for the context.

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

Details
Type
stringnull
Propertyprivatestring  $_encoding= ''

Query string encoding

Details
Type
string
Propertyprivatearray  $_entries= 'array()'

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

Default valuearray()Details
Type
array
Propertyprivateinteger  $_mode= 'null'

Grouping mode

Default valuenullDetails
Type
integer
Propertyprivatestring  $_nextEntryField= 'null'

Field specified for next entry

Default valuenullDetails
Type
string
Propertyprivateboolean  $_nextEntrySign= 'null'

True means, that term is required.

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

Default valuenullDetails
Type
boolean
Propertyprivate\arrays  $_signs= 'array()'

Entries signs.

Used in GM_SIGNS grouping mode

Default valuearray()Details
Type
\arrays

Methods

methodpublic__construct( string $encoding, string|null $defaultField = null ) : void

Context object constructor

Parameters
Name Type Description
$encoding string
$defaultField string|null
methodprivate_booleanExpressionQuery( ) : \Zend_Search_Lucene_Search_Query

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

Returns
Type Description
\Zend_Search_Lucene_Search_Query
Throws
Exception Description
\Zend_Search_Lucene
methodpublic_signStyleExpressionQuery( ) : \Zend_Search_Lucene_Search_Query

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

Returns
Type Description
\Zend_Search_Lucene_Search_Query
methodpublicaddEntry( \Zend_Search_Lucene_Search_QueryEntry $entry ) : void

Add entry to a query

Parameters
Name Type Description
$entry \Zend_Search_Lucene_Search_QueryEntry
methodpublicaddLogicalOperator( integer $operator ) : void

Process logical operator

Parameters
Name Type Description
$operator integer
methodpublicboost( float $boostFactor ) : void

Set boost factor to the entry

Parameters
Name Type Description
$boostFactor float
methodpublicgetField( ) : string|null

Get context default field

Returns
Type Description
string|null
methodpublicgetQuery( ) : \Zend_Search_Lucene_Search_Query

Generate query from current context

Returns
Type Description
\Zend_Search_Lucene_Search_Query
methodpublicprocessFuzzyProximityModifier(  $parameter = null ) : void

Process fuzzy search or proximity search modifier

Parameters
Name Type Description
$parameter
Throws
Exception Description
\Zend_Search_Lucene_Search_QueryParserException
methodpublicsetNextEntryField( string $field ) : void

Set field for next entry

Parameters
Name Type Description
$field string
methodpublicsetNextEntrySign( integer $sign ) : void

Set sign for next entry

Parameters
Name Type Description
$sign integer
Throws
Exception Description
\Zend_Search_Lucene_Exception
Documentation was generated by DocBlox 0.15.1.