Class ZSearch

Description

Located in /incubator/Zend/Search/Lucene.php (line 60)


	
			
Method Summary
 ZSearch __construct ([mixed $directory = null], [mixed $create = false])
 void addDocument (Zend_Search_Lucene_Document $document)
 void commit ()
 integer count ()
 void delete (mixed $doc, mixed $item_to_del)
 integer docFreq (Zend_Search_Lucene_Index_Term $term)
 array find (mixed $query)
 array getFieldNames ([boolean $indexed = false])
 boolean hasDeletions ()
 Zend_Search_Lucene_Document norm (integer $id, string $fieldName)
 array termDocs (Zend_Search_Lucene_Index_Term $term)
 array termPositions (Zend_Search_Lucene_Index_Term $term)
 array terms ()
 void undeleteAll ()
Methods
Constructor __construct (line 100)

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
ZSearch __construct ([mixed $directory = null], [mixed $create = false])
  • mixed $directory
addDocument (line 468)

Adds a document to this index.

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

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

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

Returns the total number of documents in this index.

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

Deletes a document from the index. $doc may contain a Zend_Search_Lucene_Document or the number of the document to delete.

  • access: public
  • todo: Implementation
void delete (mixed $doc, mixed $item_to_del)
  • mixed $item_to_del
docFreq (line 413)

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

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

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

Input is a string or ZSearchQuery.

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

Returns the ZSearchDirectory instance for this index.

  • access: public
ZSearchDirectory getDirectory ()
getDocument (line 253)

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

  • access: public
Zend_Search_Lucene_Document getDocument (integer|ZSearchQueryHit $id)
getFieldNames (line 236)

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

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

Returns an instance of Zend_Search_Lucene_Index_Writer for the index

  • access: public
getSimilarity (line 432)

Retrive similarity used by index reader

  • access: public
ZSearchSimilarity getSimilarity ()
hasDeletions (line 524)

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

  • access: public
  • todo: Implementation
boolean hasDeletions ()
norm (line 445)

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 317)

Returns an array of all the documents which contain term.

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

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 512)

Returns an array of all terms in this index.

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

Undeletes all documents currently marked as deleted in this index.

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

Documentation generated on Wed, 08 Mar 2006 04:53:26 -0800 by phpDocumentor 1.3.0RC4