Search/Lucene/Search/QueryParserContext.php
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-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Search_Lucene
- Subpackage
- Search
- Version
- $Id: QueryParserContext.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Search_Lucene_Search_QueryParserContext
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties


string|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
- Type
- string | null


array $_entries = array()
Query entries Each entry is a Zend_Search_Lucene_Search_QueryEntry object or boolean operator (Zend_Search_Lucene_Search_QueryToken class constant)
array()
Details- Type
- array


boolean $_nextEntrySign = null
True means, that term is required.
False means, that term is prohibited. null means, that term is neither prohibited, nor required
null
Details- Type
- boolean
Methods


__construct(string $encoding, string | null $defaultField = null) : void
Context object constructor
Name | Type | Description |
---|---|---|
$encoding | string | |
$defaultField | string | null |


_booleanExpressionQuery() : \Zend_Search_Lucene_Search_Query
Generate 'boolean style' query from the context
'term1 and term2 or term3 and (
Type | Description |
---|---|
\Zend_Search_Lucene_Search_Query |
Exception | Description |
---|---|
\Zend_Search_Lucene |


_signStyleExpressionQuery() : \Zend_Search_Lucene_Search_Query
Generate 'signs style' query from the context
'+term1 term2 -term3 +(
..'
Type | Description |
---|---|
\Zend_Search_Lucene_Search_Query |


addEntry(\Zend_Search_Lucene_Search_QueryEntry $entry) : void
Add entry to a query
Name | Type | Description |
---|---|---|
$entry | \Zend_Search_Lucene_Search_QueryEntry |


addLogicalOperator(integer $operator) : void
Process logical operator
Name | Type | Description |
---|---|---|
$operator | integer |


boost(float $boostFactor) : void
Set boost factor to the entry
Name | Type | Description |
---|---|---|
$boostFactor | float |


getQuery() : \Zend_Search_Lucene_Search_Query
Generate query from current context
Type | Description |
---|---|
\Zend_Search_Lucene_Search_Query |


processFuzzyProximityModifier( $parameter = null) : void
Process fuzzy search or proximity search modifier
Name | Type | Description |
---|---|---|
$parameter |
Exception | Description |
---|---|
\Zend_Search_Lucene_Search_QueryParserException |


setNextEntryField(string $field) : void
Set field for next entry
Name | Type | Description |
---|---|---|
$field | string |


setNextEntrySign(integer $sign) : void
Set sign for next entry
Name | Type | Description |
---|---|---|
$sign | integer |
Exception | Description |
---|---|
\Zend_Search_Lucene_Exception |