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.
mixed $_coord = 'null'A score factor based on the fraction of all query terms that a document contains.
float for conjunction queries array of float for non conjunction queries
Detailsarray $_resVector = 'null'Result vector.
Detailsarray $_signs = ''Term signs.
If true then term is required. If false then term is prohibited. If null then term is neither prohibited, nor required
If array is null then all terms are required
Detailsarray $_terms = 'array'Terms to find.
Array of Zend_Search_Lucene_Index_Term
Detailsarray $_termsFreqs = 'array'Terms positions vectors.
Array of Arrays: term1Id => (docId => freq, ...) term2Id => (docId => freq, ...)
Detailsarray $_weights = 'array'Terms weights array of Zend_Search_Lucene_Search_Weight
Details__construct(
array $terms
=
null, array $signs
=
null
)
:
Class constructor. Create a new multi-term query object.
if $signs array is omitted then all terms are required it differs from addTerm() behavior, but should never be used
Details__toString(
)
:
stringPrint a query
Details_calculateConjunctionResult(
Zend_Search_Lucene_Interface $reader
)
:
Calculate result vector for Conjunction query (like '+something +another')
Details_calculateNonConjunctionResult(
Zend_Search_Lucene_Interface $reader
)
:
Calculate result vector for non Conjunction query (like '+something -another')
Details_conjunctionScore(
integer $docId, Zend_Search_Lucene_Interface $reader
)
:
floatScore calculator for conjunction queries (all terms are required)
Details_highlightMatches(
Zend_Search_Lucene_Search_Highlighter_Interface $highlighter
)
:
Query specific matches highlighting
Details_nonConjunctionScore(
integer $docId, Zend_Search_Lucene_Interface $reader
)
:
floatScore calculator for non conjunction queries (not all terms are required)
DetailsaddTerm(
Zend_Search_Lucene_Index_Term $term, boolean|null $sign
=
null
)
:
voidAdd a $term (Zend_Search_Lucene_Index_Term) to this query.
The sign is specified as: TRUE - term is required FALSE - term is prohibited NULL - term is neither prohibited, nor required
DetailscreateWeight(
Zend_Search_Lucene_Interface $reader
)
:
Zend_Search_Lucene_Search_WeightConstructs an appropriate Weight implementation for this query.
Detailsexecute(
Zend_Search_Lucene_Interface $reader, Zend_Search_Lucene_Index_DocsFilter|null $docsFilter
=
null
)
:
Execute query in context of index reader It also initializes necessary internal structures
DetailsgetQueryTerms(
)
:
arrayReturn query terms
DetailsgetSigns(
)
:
arrayReturn terms signs
DetailsgetTerms(
)
:
arrayReturns query term
DetailsmatchedDocs(
)
:
arrayGet document ids likely matching the query
It's an array with document ids as keys (performance considerations)
Detailsoptimize(
Zend_Search_Lucene_Interface $index
)
:
Zend_Search_Lucene_Search_QueryOptimize query in the context of specified index
Detailsrewrite(
Zend_Search_Lucene_Interface $index
)
:
Zend_Search_Lucene_Search_QueryRe-write query into primitive queries in the context of specified index
Detailsscore(
integer $docId, Zend_Search_Lucene_Interface $reader
)
:
floatScore specified document
DetailssetWeight(
integer $num, Zend_Search_Lucene_Search_Weight_Term $weight
)
:
Set weight for specified term
Details