## Zend_Search_Lucene_Search_Query_Boolean

Description

- license: New BSD License
- copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Search/Lucene/Search/Query/Boolean.php (line 37)

    Zend_Search_Lucene_Search_Query
       |
       --Zend_Search_Lucene_Search_Query_Boolean

Method Summary
void __construct ([array $subqueries = null], [array $signs = null])
void addSubquery (Zend_Search_Lucene_Search_Query $subquery, [boolean|null $sign = null])
Zend_Search_Lucene_Search_Weight createWeight (Zend_Search_Lucene $reader)
void execute (Zend_Search_Lucene $reader)
array getQueryTerms ()
array getSigns ()
array getSubqueries ()
void highlightMatchesDOM (Zend_Search_Lucene_Document_Html $doc, integer &$colorIndex)
array matchedDocs ()
Zend_Search_Lucene_Search_Query optimize (Zend_Search_Lucene $index)
Zend_Search_Lucene_Search_Query rewrite (Zend_Search_Lucene $index)
float score (integer $docId, Zend_Search_Lucene $reader)
float _conjunctionScore (integer $docId, Zend_Search_Lucene $reader)
float _nonConjunctionScore (integer $docId, Zend_Search_Lucene $reader)
string __toString ()
Variables

#### Inherited Variables

Inherited from Zend_Search_Lucene_Search_Query

> Zend_Search_Lucene_Search_Query::$_weight

Methods
Constructor __construct (line 88)

Class constructor. Create a new Boolean query object.

if $signs array is omitted then all subqueries are required it differs from addSubquery() behavior, but should never be used

- access: public

void __construct ([array $subqueries = null], [array $signs = null])

- array $subqueries: Array of Zend_Search_Search_Query objects
- array $signs: Array of signs. Sign is boolean|null.

addSubquery (line 119)

Add a $subquery (Zend_Search_Lucene_Query) to this query.

The sign is specified as: TRUE - subquery is required FALSE - subquery is prohibited NULL - subquery is neither prohibited, nor required

- access: public

void addSubquery (Zend_Search_Lucene_Search_Query $subquery, [boolean|null $sign = null])

- Zend_Search_Lucene_Search_Query $subquery
- boolean|null $sign

createWeight (line 440)

Constructs an appropriate Weight implementation for this query.

- access: public

Zend_Search_Lucene_Search_Weight createWeight (Zend_Search_Lucene $reader)

- Zend_Search_Lucene $reader

Redefinition of:

Zend_Search_Lucene_Search_Query::createWeight()
  Constructs an appropriate Weight implementation for this query.

execute (line 594)

Execute query in context of index reader It also initializes necessary internal structures

- access: public

void execute (Zend_Search_Lucene $reader)

- Zend_Search_Lucene $reader

Redefinition of:

Zend_Search_Lucene_Search_Query::execute()
  Execute query in context of index reader It also initializes necessary internal structures

getQueryTerms (line 649)

Return query terms

- access: public

array getQueryTerms ()

Redefinition of:

Zend_Search_Lucene_Search_Query::getQueryTerms()
  Return query terms

getSigns (line 428)

Return subqueries signs

- access: public

array getSigns ()
getSubqueries (line 417)

Returns subqueries

- access: public

array getSubqueries ()
highlightMatchesDOM (line 668)

Highlight query terms

- access: public

void highlightMatchesDOM (Zend_Search_Lucene_Document_Html $doc, integer &$colorIndex)

- integer &$colorIndex
- Zend_Search_Lucene_Document_Html $doc

Redefinition of:

Zend_Search_Lucene_Search_Query::highlightMatchesDOM()
  Highlight query terms

matchedDocs (line 619)

Get document ids likely matching the query

It's an array with document ids as keys (performance considerations)

- access: public

array matchedDocs ()

Redefinition of:

Zend_Search_Lucene_Search_Query::matchedDocs()
  Get document ids likely matching the query

optimize (line 157)

Optimize query in the context of specified index

- access: public

Zend_Search_Lucene_Search_Query optimize (Zend_Search_Lucene $index)

- Zend_Search_Lucene $index

Redefinition of:

Zend_Search_Lucene_Search_Query::optimize()
  Optimize query in the context of specified index

rewrite (line 138)

Re-write queries into primitive queries

- access: public

Zend_Search_Lucene_Search_Query rewrite (Zend_Search_Lucene $index)

- Zend_Search_Lucene $index

Redefinition of:

Zend_Search_Lucene_Search_Query::rewrite()
  Re-write query into primitive queries in the context of specified index

score (line 631)

Score specified document

- access: public

float score (integer $docId, Zend_Search_Lucene $reader)

- integer $docId
- Zend_Search_Lucene $reader

Redefinition of:

Zend_Search_Lucene_Search_Query::score()
  Score specified document

_conjunctionScore (line 523)

Score calculator for conjunction queries (all subqueries are required)

- access: public

float _conjunctionScore (integer $docId, Zend_Search_Lucene $reader)

- integer $docId
- Zend_Search_Lucene $reader

_nonConjunctionScore (line 547)

Score calculator for non conjunction queries (not all subqueries are required)

- access: public

float _nonConjunctionScore (integer $docId, Zend_Search_Lucene $reader)

- integer $docId
- Zend_Search_Lucene $reader

__toString (line 682)

Print a query

- access: public

string __toString ()

Redefinition of:

Zend_Search_Lucene_Search_Query::__toString()
  Print a query

#### Inherited Methods

Inherited From Zend_Search_Lucene_Search_Query

> Zend_Search_Lucene_Search_Query::createWeight()
> Zend_Search_Lucene_Search_Query::execute()
> Zend_Search_Lucene_Search_Query::getBoost()
> Zend_Search_Lucene_Search_Query::getQueryTerms()
> Zend_Search_Lucene_Search_Query::highlightMatches()
> Zend_Search_Lucene_Search_Query::highlightMatchesDOM()
> Zend_Search_Lucene_Search_Query::matchedDocs()
> Zend_Search_Lucene_Search_Query::optimize()
> Zend_Search_Lucene_Search_Query::reset()
> Zend_Search_Lucene_Search_Query::rewrite()
> Zend_Search_Lucene_Search_Query::score()
> Zend_Search_Lucene_Search_Query::setBoost()
> Zend_Search_Lucene_Search_Query::_getHighlightColor()
> Zend_Search_Lucene_Search_Query::_initWeight()
> Zend_Search_Lucene_Search_Query::__toString()

Documentation generated on Wed, 21 Feb 2007 11:45:59 -0800 by phpDocumentor 1.3.1