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 license@zend.com 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
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
Details- 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)
Default value
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
Default valuenull
Details- Type
- boolean
Methods
__construct(string $encoding, string | null $defaultField = null) : void
Context object constructor
Parameters
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 (
Returns
Throws
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 +(
..'
ReturnsType | Description |
---|---|
\Zend_Search_Lucene_Search_Query |
addEntry(\Zend_Search_Lucene_Search_QueryEntry $entry) : void
Add entry to a query
Parameters
Name | Type | Description |
---|---|---|
$entry | \Zend_Search_Lucene_Search_QueryEntry |
addLogicalOperator(integer $operator) : void
Process logical operator
Parameters
Name | Type | Description |
---|---|---|
$operator | integer |
boost(float $boostFactor) : void
Set boost factor to the entry
Parameters
Name | Type | Description |
---|---|---|
$boostFactor | float |
getQuery() : \Zend_Search_Lucene_Search_Query
Generate query from current context
Returns
Type | Description |
---|---|
\Zend_Search_Lucene_Search_Query |
processFuzzyProximityModifier( $parameter = null) : void
Process fuzzy search or proximity search modifier
Parameters
Throws
Name | Type | Description |
---|---|---|
$parameter |
Exception | Description |
---|---|
\Zend_Search_Lucene_Search_QueryParserException |
setNextEntryField(string $field) : void
Set field for next entry
Parameters
Name | Type | Description |
---|---|---|
$field | string |
setNextEntrySign(integer $sign) : void
Set sign for next entry
Parameters
Throws
Name | Type | Description |
---|---|---|
$sign | integer |
Exception | Description |
---|---|
\Zend_Search_Lucene_Exception |