QueryParserContext
in package
Tags
Table of Contents
Constants
- GM_BOOLEAN = 1
- GM_SIGNS = 0
- Entries grouping mode
Properties
- $_defaultField : string|null
- Default field for the context.
- $_encoding : string
- Query string encoding
- $_entries : array<string|int, mixed>
- Query entries Each entry is a Zend_Search_Lucene_Search_QueryEntry object or boolean operator (Zend_Search_Lucene_Search_QueryToken class constant)
- $_mode : int
- Grouping mode
- $_nextEntryField : string
- Field specified for next entry
- $_nextEntrySign : bool
- True means, that term is required.
- $_signs : array<string|int, mixed>
- Entries signs.
Methods
- __construct() : mixed
- Context object constructor
- _signStyleExpressionQuery() : AbstractQuery
- Generate 'signs style' query from the context '+term1 term2 -term3 +(<subquery1>) ...'
- addEntry() : void
- Add entry to a query
- addLogicalOperator() : void
- Process logical operator
- boost() : void
- Set boost factor to the entry
- getField() : string|null
- Get context default field
- getQuery() : AbstractQuery
- Generate query from current context
- processFuzzyProximityModifier() : void
- Process fuzzy search or proximity search modifier
- setNextEntryField() : void
- Set field for next entry
- setNextEntrySign() : void
- Set sign for next entry
- _booleanExpressionQuery() : AbstractQuery
- Generate 'boolean style' query from the context 'term1 and term2 or term3 and (<subquery1>) and not (<subquery2>)'
Constants
GM_BOOLEAN
public
mixed
GM_BOOLEAN
= 1
GM_SIGNS
Entries grouping mode
public
mixed
GM_SIGNS
= 0
Properties
$_defaultField
Default field for the context.
private
string|null
$_defaultField
null means, that term should be searched through all fields Zend_Search_Lucene_Search_Query::rewriteQuery($index) transletes such queries to several
$_encoding
Query string encoding
private
string
$_encoding
$_entries
Query entries Each entry is a Zend_Search_Lucene_Search_QueryEntry object or boolean operator (Zend_Search_Lucene_Search_QueryToken class constant)
private
array<string|int, mixed>
$_entries
= array()
$_mode
Grouping mode
private
int
$_mode
= null
$_nextEntryField
Field specified for next entry
private
string
$_nextEntryField
= null
$_nextEntrySign
True means, that term is required.
private
bool
$_nextEntrySign
= null
False means, that term is prohibited. null means, that term is neither prohibited, nor required
$_signs
Entries signs.
private
array<string|int, mixed>
$_signs
= array()
Used in GM_SIGNS grouping mode
Methods
__construct()
Context object constructor
public
__construct(string $encoding[, string|null $defaultField = null ]) : mixed
Parameters
- $encoding : string
- $defaultField : string|null = null
_signStyleExpressionQuery()
Generate 'signs style' query from the context '+term1 term2 -term3 +(<subquery1>) ...'
public
_signStyleExpressionQuery() : AbstractQuery
Return values
AbstractQueryaddEntry()
Add entry to a query
public
addEntry(AbstractQueryEntry $entry) : void
Parameters
- $entry : AbstractQueryEntry
addLogicalOperator()
Process logical operator
public
addLogicalOperator(int $operator) : void
Parameters
- $operator : int
Tags
boost()
Set boost factor to the entry
public
boost(float $boostFactor) : void
Parameters
- $boostFactor : float
Tags
getField()
Get context default field
public
getField() : string|null
Return values
string|nullgetQuery()
Generate query from current context
public
getQuery() : AbstractQuery
Return values
AbstractQueryprocessFuzzyProximityModifier()
Process fuzzy search or proximity search modifier
public
processFuzzyProximityModifier([mixed $parameter = null ]) : void
Parameters
- $parameter : mixed = null
Tags
setNextEntryField()
Set field for next entry
public
setNextEntryField(string $field) : void
Parameters
- $field : string
setNextEntrySign()
Set sign for next entry
public
setNextEntrySign(int $sign) : void
Parameters
- $sign : int
Tags
_booleanExpressionQuery()
Generate 'boolean style' query from the context 'term1 and term2 or term3 and (<subquery1>) and not (<subquery2>)'
private
_booleanExpressionQuery() : AbstractQuery