Class Zend_Search_Lucene_Index_Writer

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

Located in /Zend/Search/Lucene/Index/Writer.php (line 37)


	
			
Variable Summary
 integer $maxMergeDocs
 integer $mergeFactor
 integer $minMergeDocs
Method Summary
 Zend_Search_Lucene_Index_Writer __construct (Zend_Search_Lucene_Storage_Directory $directory, [boolean $create = false])
 void addIndexes (array $readers)
 void close ()
 array commit ()
 integer docCount ( $readers)
 void optimize ()
Variables
integer $maxMergeDocs (line 101)

Determines the largest number of documents ever merged by addDocument().

  • access: public
integer $mergeFactor (line 85)

Determines how often segment indices are merged by addDocument().

  • access: public
integer $minMergeDocs (line 94)

Determines the minimal number of documents required before the buffered in-memory documents are merging and a new Segment is created.

  • access: public
Methods
Constructor __construct (line 147)

Opens the index for writing

IndexWriter constructor needs Directory as a parameter. It should be a string with a path to the index folder or a Directory object. Second constructor parameter create is optional - true to create the index or overwrite the existing one.

  • access: public
Zend_Search_Lucene_Index_Writer __construct (Zend_Search_Lucene_Storage_Directory $directory, [boolean $create = false])
addDocument (line 200)

Adds a document to this index.

  • access: public
void addDocument (Zend_Search_Lucene_Document $document)
addIndexes (line 275)

Merges the provided indexes into this index.

  • access: public
void addIndexes (array $readers)
  • array $readers
close (line 300)

Flushes all changes to an index and closes all associated files.

  • access: public
void close ()
commit (line 248)

Commit current changes returns array of new segments

  • access: public
array commit ()
docCount (line 288)

Returns the number of documents currently in this index.

  • access: public
integer docCount ( $readers)
  • $readers
optimize (line 314)

Merges all segments together into a single segment, optimizing an index for search.

return void

  • access: public
void optimize ()

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