API Documentation

Zend/Search/Lucene/Search/BooleanExpressionRecognizer.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: BooleanExpressionRecognizer.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Search_Lucene_Search_BooleanExpressionRecognizer

Package: Zend\Search\Lucene\Search

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

Constants

Constant  ST_START = 0

State Machine states

Constant  ST_LITERAL = 1
Constant  ST_NOT_OPERATOR = 2
Constant  ST_AND_OPERATOR = 3
Constant  ST_OR_OPERATOR = 4
Constant  IN_LITERAL = 0

Input symbols

Constant  IN_NOT_OPERATOR = 1
Constant  IN_AND_OPERATOR = 2
Constant  IN_OR_OPERATOR = 3

Properties

Propertyprivatearray  $_conjunctions= 'array()'

Set of boolean query conjunctions

Each conjunction is an array of conjunction elements Each conjunction element is presented with two-elements array: array(, )

So, it has a structure: array( array( array(, ), // first literal of first conjuction array(, ), // second literal of first conjuction ... array(, ) ), // end of first conjuction array( array(, ), // first literal of second conjuction array(, ), // second literal of second conjuction ... array(, ) ), // end of second conjuction ... ) // end of structure

Default valuearray()Details
Type
array
Propertyprivatearray  $_currentConjunction= 'array()'

Current conjuction

Default valuearray()Details
Type
array
Propertyprivatemixed  $_literal= ''

Current literal

Details
Type
mixed
Propertyprivateboolean  $_negativeLiteral= 'false'

NOT operator signal

Default valuefalseDetails
Type
boolean

Methods

methodpublic__construct( ) : void

Object constructor

methodpublicemptyNotOperatorAction( ) : void

default (omitted) + NOT operator processing

methodpublicemptyOperatorAction( ) : void

default (omitted) operator processing

methodpublicfinishExpression( ) : array

Finish an expression and return result

Result is a set of boolean query conjunctions

Each conjunction is an array of conjunction elements Each conjunction element is presented with two-elements array: array(, )

So, it has a structure: array( array( array(, ), // first literal of first conjuction array(, ), // second literal of first conjuction ... array(, ) ), // end of first conjuction array( array(, ), // first literal of second conjuction array(, ), // second literal of second conjuction ... array(, ) ), // end of second conjuction ... ) // end of structure

Returns
Type Description
array
Throws
Exception Description
\Zend_Search_Lucene_Exception
methodpublicliteralAction( ) : void

Literal processing

methodpublicnotOperatorAction( ) : void

NOT operator processing

methodpublicorOperatorAction( ) : void

OR operator processing Close current conjunction

methodpublicprocessLiteral(  $literal ) : void

Process expression literal.

Parameters
Name Type Description
$literal
methodpublicprocessOperator( integer $operator ) : void

Process next operator.

Operators are defined by class constants: IN_AND_OPERATOR, IN_OR_OPERATOR and IN_NOT_OPERATOR

Parameters
Name Type Description
$operator integer
Documentation was generated by DocBlox 0.15.1.