## Zend_Search_Lucene_Search_Query

Description

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

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

Direct descendents

Class | Description
--- | ---
Zend_Search_Lucene_Search_Query_Boolean |
Zend_Search_Lucene_Search_Query_Empty |
Zend_Search_Lucene_Search_Query_MultiTerm |
Zend_Search_Lucene_Search_Query_Phrase | A Query that matches documents containing a particular sequence of terms.
Zend_Search_Lucene_Search_Query_Term |

Variable Summary
Zend_Search_Lucene_Search_Weight $_weight
Method Summary
Zend_Search_Lucene_Search_Weight createWeight (Zend_Search_Lucene $reader)
void execute (Zend_Search_Lucene $reader)
float getBoost ()
array getQueryTerms ()
string highlightMatches ($inputHTML $inputHTML)
void highlightMatchesDOM (Zend_Search_Lucene_Document_Html $doc, integer &$colorIndex)
array matchedDocs ()
Zend_Search_Lucene_Search_Query optimize (Zend_Search_Lucene $index)
void reset ()
Zend_Search_Lucene_Search_Query rewrite (Zend_Search_Lucene $index)
float score (integer $docId, Zend_Search_Lucene $reader)
void setBoost (float $boost)
string _getHighlightColor (integer &$colorIndex)
void _initWeight (Zend_Search_Lucene $reader)
string __toString ()
Variables
Zend_Search_Lucene_Search_Weight $_weight = null (line 48)

Query weight

- access: protected

Methods
createWeight (line 124)

Constructs an appropriate Weight implementation for this query.

- access: public
- abstract:

Zend_Search_Lucene_Search_Weight createWeight (Zend_Search_Lucene $reader)

- Zend_Search_Lucene $reader

Redefined in descendants as:

- Zend_Search_Lucene_Search_Query_Boolean::createWeight() : Constructs an appropriate Weight implementation for this query.
- Zend_Search_Lucene_Search_Query_Empty::createWeight() : Constructs an appropriate Weight implementation for this query.
- Zend_Search_Lucene_Search_Query_MultiTerm::createWeight() : Constructs an appropriate Weight implementation for this query.
- Zend_Search_Lucene_Search_Query_Phrase::createWeight() : Constructs an appropriate Weight implementation for this query.
- Zend_Search_Lucene_Search_Query_Term::createWeight() : Constructs an appropriate Weight implementation for this query.

execute (line 116)

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

Query specific implementation

- access: public
- abstract:

void execute (Zend_Search_Lucene $reader)

- Zend_Search_Lucene $reader

Redefined in descendants as:

- Zend_Search_Lucene_Search_Query_Boolean::execute() : Execute query in context of index reader It also initializes necessary internal structures
- Zend_Search_Lucene_Search_Query_Empty::execute() : Execute query in context of index reader It also initializes necessary internal structures
- Zend_Search_Lucene_Search_Query_MultiTerm::execute() : Execute query in context of index reader It also initializes necessary internal structures
- Zend_Search_Lucene_Search_Query_Phrase::execute() : Execute query in context of index reader It also initializes necessary internal structures
- Zend_Search_Lucene_Search_Query_Term::execute() : Execute query in context of index reader It also initializes necessary internal structures

getBoost (line 75)

Gets the boost for this clause. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by boost. The boost is 1.0 by default.

- access: public

float getBoost ()
getQueryTerms (line 182)

Return query terms

- access: public
- abstract:

array getQueryTerms ()

Redefined in descendants as:

- Zend_Search_Lucene_Search_Query_Boolean::getQueryTerms() : Return query terms
- Zend_Search_Lucene_Search_Query_Empty::getQueryTerms() : Return query terms
- Zend_Search_Lucene_Search_Query_MultiTerm::getQueryTerms() : Return query terms
- Zend_Search_Lucene_Search_Query_Phrase::getQueryTerms() : Return query terms
- Zend_Search_Lucene_Search_Query_Term::getQueryTerms() : Return query terms

highlightMatches (line 213)

Highlight matches in $inputHTML

- access: public

string highlightMatches ($inputHTML $inputHTML)

- $inputHTML $inputHTML

highlightMatchesDOM (line 205)

Highlight query terms

- access: public
- abstract:

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

- integer &$colorIndex
- Zend_Search_Lucene_Document_Html $doc

Redefined in descendants as:

- Zend_Search_Lucene_Search_Query_Boolean::highlightMatchesDOM() : Highlight query terms
- Zend_Search_Lucene_Search_Query_Empty::highlightMatchesDOM() : Highlight query terms
- Zend_Search_Lucene_Search_Query_MultiTerm::highlightMatchesDOM() : Highlight query terms
- Zend_Search_Lucene_Search_Query_Phrase::highlightMatchesDOM() : Highlight query terms
- Zend_Search_Lucene_Search_Query_Term::highlightMatchesDOM() : Highlight query terms

matchedDocs (line 106)

Get document ids likely matching the query

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

- access: public
- abstract:

array matchedDocs ()

Redefined in descendants as:

- Zend_Search_Lucene_Search_Query_Boolean::matchedDocs() : Get document ids likely matching the query
- Zend_Search_Lucene_Search_Query_Empty::matchedDocs() : Get document ids likely matching the query
- Zend_Search_Lucene_Search_Query_MultiTerm::matchedDocs() : Get document ids likely matching the query
- Zend_Search_Lucene_Search_Query_Phrase::matchedDocs() : Get document ids likely matching the query
- Zend_Search_Lucene_Search_Query_Term::matchedDocs() : Get document ids likely matching the query

optimize (line 158)

Optimize query in the context of specified index

- access: public
- abstract:

Zend_Search_Lucene_Search_Query optimize (Zend_Search_Lucene $index)

- Zend_Search_Lucene $index

Redefined in descendants as:

- Zend_Search_Lucene_Search_Query_Boolean::optimize() : Optimize query in the context of specified index
- Zend_Search_Lucene_Search_Query_Empty::optimize() : Optimize query in the context of specified index
- Zend_Search_Lucene_Search_Query_MultiTerm::optimize() : Optimize query in the context of specified index
- Zend_Search_Lucene_Search_Query_Phrase::optimize() : Optimize query in the context of specified index
- Zend_Search_Lucene_Search_Query_Term::optimize() : Optimize query in the context of specified index

reset (line 164)

Reset query, so it can be reused within other queries or

with other indeces

- access: public

void reset ()
rewrite (line 150)

Re-write query into primitive queries in the context of specified index

- access: public
- abstract:

Zend_Search_Lucene_Search_Query rewrite (Zend_Search_Lucene $index)

- Zend_Search_Lucene $index

Redefined in descendants as:

- Zend_Search_Lucene_Search_Query_Boolean::rewrite() : Re-write queries into primitive queries
- Zend_Search_Lucene_Search_Query_Empty::rewrite() : Re-write query into primitive queries in the context of specified index
- Zend_Search_Lucene_Search_Query_MultiTerm::rewrite() : Re-write query into primitive queries in the context of specified index
- Zend_Search_Lucene_Search_Query_Phrase::rewrite() : Re-write query into primitive queries in the context of specified index
- Zend_Search_Lucene_Search_Query_Term::rewrite() : Re-write query into primitive queries in the context of specified index

score (line 97)

Score specified document

- access: public
- abstract:

float score (integer $docId, Zend_Search_Lucene $reader)

- integer $docId
- Zend_Search_Lucene $reader

Redefined in descendants as:

- Zend_Search_Lucene_Search_Query_Boolean::score() : Score specified document
- Zend_Search_Lucene_Search_Query_Empty::score() : Score specified document
- Zend_Search_Lucene_Search_Query_MultiTerm::score() : Score specified document
- Zend_Search_Lucene_Search_Query_Phrase::score() : Score specified document
- Zend_Search_Lucene_Search_Query_Term::score() : Score specified document

setBoost (line 85)

Sets the boost for this query clause to $boost.

- access: public

void setBoost (float $boost)

- float $boost

_getHighlightColor (line 190)

Get highlight color and shift to next

- access: protected

string _getHighlightColor (integer &$colorIndex)

- integer &$colorIndex

_initWeight (line 131)

Constructs an initializes a Weight for a _top-level_query_.

- access: protected

void _initWeight (Zend_Search_Lucene $reader)

- Zend_Search_Lucene $reader

__toString (line 175)

Print a query

- access: public
- abstract:

string __toString ()

Redefined in descendants as:

- Zend_Search_Lucene_Search_Query_Boolean::__toString() : Print a query
- Zend_Search_Lucene_Search_Query_Empty::__toString() : Print a query
- Zend_Search_Lucene_Search_Query_MultiTerm::__toString() : Print a query
- Zend_Search_Lucene_Search_Query_Phrase::__toString() : Print a query
- Zend_Search_Lucene_Search_Query_Term::__toString() : Print a query

Documentation generated on Wed, 21 Feb 2007 11:57:58 -0800 by phpDocumentor 1.3.1