[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/search/Zend/Search/Lucene/Search/Query/ -> Phrase.php (summary)

Zend Framework LICENSE

Copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
License: http://framework.zend.com/license/new-bsd New BSD License
File Size: 542 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Zend_Search_Lucene_Search_Query_Phrase:: (17 methods):
  __construct()
  setSlop()
  getSlop()
  addTerm()
  rewrite()
  optimize()
  getTerms()
  setWeight()
  createWeight()
  _exactPhraseFreq()
  _sloppyPhraseFreq()
  execute()
  matchedDocs()
  score()
  getQueryTerms()
  highlightMatchesDOM()
  __toString()


Class: Zend_Search_Lucene_Search_Query_Phrase  - X-Ref

A Query that matches documents containing a particular sequence of terms.

__construct($terms = null, $offsets = null, $field = null)   X-Ref
Class constructor.  Create a new prase query.

param: string $field    Field to search.
param: array  $terms    Terms to search Array of strings.
param: array  $offsets  Relative term positions. Array of integers.

setSlop($slop)   X-Ref
Set slop

param: integer $slop

getSlop()   X-Ref
Get slop

return: integer

addTerm(Zend_Search_Lucene_Index_Term $term, $position = null)   X-Ref
Adds a term to the end of the query phrase.
The relative position of the term is specified explicitly or the one immediately
after the last term added.

param: Zend_Search_Lucene_Index_Term $term
param: integer $position

rewrite(Zend_Search_Lucene_Interface $index)   X-Ref
Re-write query into primitive queries in the context of specified index

param: Zend_Search_Lucene_Interface $index
return: Zend_Search_Lucene_Search_Query

optimize(Zend_Search_Lucene_Interface $index)   X-Ref
Optimize query in the context of specified index

param: Zend_Search_Lucene_Interface $index
return: Zend_Search_Lucene_Search_Query

getTerms()   X-Ref
Returns query term

return: array

setWeight($num, $weight)   X-Ref
Set weight for specified term

param: integer $num
param: Zend_Search_Lucene_Search_Weight_Term $weight

createWeight(Zend_Search_Lucene_Interface $reader)   X-Ref
Constructs an appropriate Weight implementation for this query.

param: Zend_Search_Lucene_Interface $reader
return: Zend_Search_Lucene_Search_Weight

_exactPhraseFreq($docId)   X-Ref
Score calculator for exact phrase queries (terms sequence is fixed)

param: integer $docId
return: float

_sloppyPhraseFreq($docId, Zend_Search_Lucene_Interface $reader)   X-Ref
Score calculator for sloppy phrase queries (terms sequence is fixed)

param: integer $docId
param: Zend_Search_Lucene_Interface $reader
return: float

execute(Zend_Search_Lucene_Interface $reader)   X-Ref
Execute query in context of index reader
It also initializes necessary internal structures

param: Zend_Search_Lucene_Interface $reader

matchedDocs()   X-Ref
Get document ids likely matching the query

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

return: array

score($docId, Zend_Search_Lucene_Interface $reader)   X-Ref
Score specified document

param: integer $docId
param: Zend_Search_Lucene_Interface $reader
return: float

getQueryTerms()   X-Ref
Return query terms

return: array

highlightMatchesDOM(Zend_Search_Lucene_Document_Html $doc, &$colorIndex)   X-Ref
Highlight query terms

param: integer &$colorIndex
param: Zend_Search_Lucene_Document_Html $doc

__toString()   X-Ref
Print a query

return: string



Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7