Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Search_Lucene_Index_SegmentWriter_DocumentWriter Class Reference

Public Member Functions

 __construct (Zend_Search_Lucene_Storage_Directory $directory, $name)
 Object constructor.
 
 addDocument (Zend_Search_Lucene_Document $document)
 Adds a document to this segment.
 
 close ()
 Close segment, write it to disk and return segment info.
 
- Public Member Functions inherited from Zend_Search_Lucene_Index_SegmentWriter
 __construct (Zend_Search_Lucene_Storage_Directory $directory, $name)
 Object constructor.
 
 addField (Zend_Search_Lucene_Field $field)
 Add field to the segment.
 
 addFieldInfo (Zend_Search_Lucene_Index_FieldInfo $fieldInfo)
 Add fieldInfo to the segment.
 
 getFieldInfos ()
 Returns array of FieldInfo objects.
 
 addStoredFields ($storedFields)
 Add stored fields information.
 
 count ()
 Returns the total number of documents in this segment.
 
 getName ()
 Return segment name.
 
 initializeDictionaryFiles ()
 Create dicrionary, frequency and positions files and write necessary headers.
 
 addTerm ($termEntry, $termDocs)
 Add term.
 
 closeDictionaryFiles ()
 Close dictionary.
 
 close ()
 Close segment, write it to disk and return segment info.
 

Protected Member Functions

 _dumpDictionary ()
 Dump Term Dictionary (.tis) and Term Dictionary Index (.tii) segment files.
 
- Protected Member Functions inherited from Zend_Search_Lucene_Index_SegmentWriter
 _dumpFNM ()
 Dump Field Info (.fnm) segment file.
 
 _dumpTermDictEntry (Zend_Search_Lucene_Storage_File $dicFile, &$prevTerm, Zend_Search_Lucene_Index_Term $term, &$prevTermInfo, Zend_Search_Lucene_Index_TermInfo $termInfo)
 Dump Term Dictionary segment file entry.
 
 _generateCFS ()
 Generate compound index file.
 

Protected Attributes

 $_termDictionary
 
 $_termDocs
 
- Protected Attributes inherited from Zend_Search_Lucene_Index_SegmentWriter
 $_docCount = 0
 
 $_name
 
 $_directory
 
 $_files = array()
 
 $_fields = array()
 
 $_norms = array()
 
 $_fdxFile = null
 
 $_fdtFile = null
 

Additional Inherited Members

- Static Public Attributes inherited from Zend_Search_Lucene_Index_SegmentWriter
static $indexInterval = 128
 
static $skipInterval = 0x7FFFFFFF
 
static $maxSkipLevels = 0
 

Constructor & Destructor Documentation

__construct ( Zend_Search_Lucene_Storage_Directory  $directory,
  $name 
)

Object constructor.

Parameters
Zend_Search_Lucene_Storage_Directory$directory
string$name

Member Function Documentation

_dumpDictionary ( )
protected

Dump Term Dictionary (.tis) and Term Dictionary Index (.tii) segment files.

addDocument ( Zend_Search_Lucene_Document  $document)

Adds a document to this segment.

Parameters
Zend_Search_Lucene_Document$document
Exceptions
Zend_Search_Lucene_Exception

Zend_Search_Lucene_Search_Similarity

Todo:
term vector storing support

Zend_Search_Lucene_Analysis_Analyzer

close ( )

Close segment, write it to disk and return segment info.

Returns
Zend_Search_Lucene_Index_SegmentInfo

Zend_Search_Lucene_Index_SegmentInfo

Member Data Documentation

$_termDictionary
protected
$_termDocs
protected