Search/Lucene/Search/QueryParserContext.php

Show: PublicProtectedPrivateinherited
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 [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Search_Lucene  
Subpackage
Search  
Version
$Id$  

\Zend_Search_Lucene_Search_QueryParserContext

Package: Zend_Search_Lucene\Search
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  GM_SIGNS = 0
Entries grouping mode
>VConstant  GM_BOOLEAN = 1

Properties

>VPropertyprivatestring|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
string | null
>VPropertyprivatestring $_encoding
Query string encoding
Details
Type
string
>VPropertyprivatearray $_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
>VPropertyprivateinteger $_mode = null
Grouping mode
Default valuenullDetails
Type
integer
>VPropertyprivatestring $_nextEntryField = null
Field specified for next entry
Default valuenullDetails
Type
string
>VPropertyprivateboolean $_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
>VPropertyprivate\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
NameTypeDescription
$encodingstring
$defaultFieldstring | null
methodprivate_booleanExpressionQuery() : \Zend_Search_Lucene_Search_Query

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

Returns
TypeDescription
\Zend_Search_Lucene_Search_Query
Throws
ExceptionDescription
\Zend_Search_Lucene
methodpublic_signStyleExpressionQuery() : \Zend_Search_Lucene_Search_Query

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

..'
Returns
TypeDescription
\Zend_Search_Lucene_Search_Query
methodpublicaddEntry(\Zend_Search_Lucene_Search_QueryEntry $entry) : void

Add entry to a query

Parameters
NameTypeDescription
$entry\Zend_Search_Lucene_Search_QueryEntry
methodpublicaddLogicalOperator(integer $operator) : void

Process logical operator

Parameters
NameTypeDescription
$operatorinteger
methodpublicboost(float $boostFactor) : void

Set boost factor to the entry

Parameters
NameTypeDescription
$boostFactorfloat
methodpublicgetField() : string | null

Get context default field

Returns
TypeDescription
string | null
methodpublicgetQuery() : \Zend_Search_Lucene_Search_Query

Generate query from current context

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

Process fuzzy search or proximity search modifier

Parameters
NameTypeDescription
$parameter
Throws
ExceptionDescription
\Zend_Search_Lucene_Search_QueryParserException
methodpublicsetNextEntryField(string $field) : void

Set field for next entry

Parameters
NameTypeDescription
$fieldstring
methodpublicsetNextEntrySign(integer $sign) : void

Set sign for next entry

Parameters
NameTypeDescription
$signinteger
Throws
ExceptionDescription
\Zend_Search_Lucene_Exception
Documentation was generated by phpDocumentor 2.2.0 .