Class Zend_Search_Lucene

Description
  • license: New BSD License
  • copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Search/Lucene.php (line 62)


	
			
Method Summary
 Zend_Search_Lucene __construct ([mixed $directory = null], [ $create = false])
 void __destruct ()
 void commit ()
 integer count ()
 array find (mixed $query)
 array getFieldNames ([boolean $indexed = false])
 boolean hasDeletions ()
 Zend_Search_Lucene_Document norm (integer $id, string $fieldName)
 array terms ()
 void undeleteAll ()
Methods
Constructor __construct (line 115)

Opens the index.

IndexReader constructor needs Directory as a parameter. It should be a string with a path to the index folder or a Directory object.

  • access: public
  • throws: Zend_Search_Lucene_Exception
Zend_Search_Lucene __construct ([mixed $directory = null], [ $create = false])
  • mixed $directory
  • $create
Destructor __destruct (line 172)

Object destructor

  • access: public
void __destruct ()
addDocument (line 549)

Adds a document to this index.

  • access: public
void addDocument (Zend_Search_Lucene_Document $document)
commit (line 564)

Commit changes resulting from delete() or undeleteAll() operations.

  • access: public
  • todo: delete() and undeleteAll processing.
void commit ()
count (line 212)

Returns the total number of documents in this index.

  • access: public
integer count ()
delete (line 519)

Deletes a document from the index.

$id is an internal document id

  • access: public
  • throws: Zend_Search_Lucene_Exception
void delete (integer|Zend_Search_Lucene_Search_QueryHit $id)
docFreq (line 441)

Returns the number of documents in this index containing the $term.

  • access: public
integer docFreq (Zend_Search_Lucene_Index_Term $term)
find (line 226)

Performs a query against the index and returns an array of Zend_Search_Lucene_Search_QueryHit objects.

Input is a string or Zend_Search_Lucene_Search_Query.

  • return: ZSearchHit
  • access: public
array find (mixed $query)
  • mixed $query
getDirectory (line 201)

Returns the Zend_Search_Lucene_Storage_Directory instance for this index.

  • access: public
getDocument (line 282)

Returns a Zend_Search_Lucene_Document object for the document number $id in this index.

  • access: public
getFieldNames (line 265)

Returns a list of all unique field names that exist in this index.

  • access: public
array getFieldNames ([boolean $indexed = false])
  • boolean $indexed
getIndexWriter (line 186)

Returns an instance of Zend_Search_Lucene_Index_Writer for the index

  • access: public
getSimilarity (line 460)

Retrive similarity used by index reader

  • access: public
hasDeletions (line 500)

Returns true if any documents have been deleted from this index.

  • access: public
boolean hasDeletions ()
norm (line 473)

Returns a normalization factor for "field, document" pair.

  • access: public
Zend_Search_Lucene_Document norm (integer $id, string $fieldName)
  • integer $id
  • string $fieldName
termDocs (line 343)

Returns an array of all the documents which contain term.

  • access: public
array termDocs (Zend_Search_Lucene_Index_Term $term)
termPositions (line 386)

Returns an array of all term positions in the documents.

Return array structure: array( docId => array( pos1, pos2, ...), ...)

  • access: public
array termPositions (Zend_Search_Lucene_Index_Term $term)
terms (line 601)

Returns an array of all terms in this index.

  • access: public
  • todo: Implementation
array terms ()
undeleteAll (line 612)

Undeletes all documents currently marked as deleted in this index.

  • access: public
  • todo: Implementation
void undeleteAll ()

Documentation generated on Fri, 30 Jun 2006 11:21:04 -0500 by phpDocumentor 1.3.0RC6