Class Zend_Search_Lucene_Index_Writer

Description

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


	
			
Variable Summary
Method Summary
 Zend_Search_Lucene_Index_Writer __construct (Zend_Search_Lucene_Storage_Directory $directory, [boolean $create = false])
 void addDocument (Zend_Search_Lucene_Document $document)
 void addIndexes (array $readers)
 void close ()
 array commit ()
 integer docCount (mixed $readers)
 void optimize ()
 string _newSegmentName ()
 void _updateSegments ()
Variables
integer $maxMergeDocs (line 99)

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

  • access: public
integer $mergeFactor (line 83)

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

  • access: public
integer $minMergeDocs (line 92)

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

  • access: public
Zend_Search_Lucene_Index_SegmentWriter $_currentSegment (line 114)

Current segment to add documents

  • access: private
Zend_Search_Lucene_Storage_Directory $_directory = null (line 51)

File system adapter.

  • access: private
array $_newSegments (line 107)

List of the segments, created by index writer Array of Zend_Search_Lucene_Index_SegmentInfo objects

  • access: private
integer $_segmentNameCounter (line 68)

Segment name counter.

Used to name new segments .

  • access: private
inteher $_segments (line 75)

Number of the segments in the index

  • access: private
integer $_version (line 60)

Index version Counts how often the index has been changed by adding or deleting docs

  • access: private
Methods
Constructor __construct (line 127)

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

Adds a document to this index.

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

Merges the provided indexes into this index.

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

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

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

Commit current changes returns array of new segments

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

Returns the number of documents currently in this index.

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

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

return void

  • access: public
void optimize ()
_newSegmentName (line 303)

Get name for new segment

  • access: private
string _newSegmentName ()
_updateSegments (line 197)

Update segments file by adding current segment to a list

  • access: private
  • throws: Zend_Search_Lucene_Exception
  • todo: !!!!!Finish the implementation
void _updateSegments ()

Documentation generated on Tue, 18 Apr 2006 11:55:49 -0700 by phpDocumentor 1.3.0RC3