\Zend_Search_Lucene_Index_SegmentWriter
- Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Search_Lucene_Index_SegmentWriter
{
- // members
- public static integer $indexInterval = 128;
- public static integer $skipInterval = 0x7FFFFFFF;
- public static integer $maxSkipLevels = 0;
- protected integer $_docCount = 0;
- protected $_name;
- protected Zend_Search_Lucene_Storage_Directory $_directory;
- protected unknown_type $_files = ;
- protected array $_fields = ;
- protected array $_norms = ;
- protected Zend_Search_Lucene_Storage_File $_fdxFile = NULL;
- protected Zend_Search_Lucene_Storage_File $_fdtFile = NULL;
- private Zend_Search_Lucene_Storage_File $_tisFile = NULL;
- private Zend_Search_Lucene_Storage_File $_tiiFile = NULL;
- private Zend_Search_Lucene_Storage_File $_frqFile = NULL;
- private Zend_Search_Lucene_Storage_File $_prxFile = NULL;
- private $_termCount;
- private Zend_Search_Lucene_Index_Term $_prevTerm;
- private Zend_Search_Lucene_Index_TermInfo $_prevTermInfo;
- private Zend_Search_Lucene_Index_Term $_prevIndexTerm;
- private Zend_Search_Lucene_Index_TermInfo $_prevIndexTermInfo;
- private $_lastIndexPosition;
- // methods
- public void __construct()
- public integer addField()
- public integer addFieldInfo()
- public array getFieldInfos()
- public void addStoredFields()
- public integer count()
- public string getName()
- protected void _dumpFNM()
- public void initializeDictionaryFiles()
- public void addTerm()
- public void closeDictionaryFiles()
- protected void _dumpTermDictEntry()
- protected void _generateCFS()
- public abstract Zend_Search_Lucene_Index_SegmentInfo close()
Members
private
- $_frqFile
—
Zend_Search_Lucene_Storage_File
Frequencies file - $_lastIndexPosition
—
integer
Last term dictionary file position - $_prevIndexTerm
—
Zend_Search_Lucene_Index_Term
Last saved index term - $_prevIndexTermInfo
—
Zend_Search_Lucene_Index_TermInfo
Last saved index term info - $_prevTerm
—
Zend_Search_Lucene_Index_Term
Last saved term - $_prevTermInfo
—
Zend_Search_Lucene_Index_TermInfo
Last saved term info - $_prxFile
—
Zend_Search_Lucene_Storage_File
Positions file - $_termCount
—
integer
Number of written terms - $_tiiFile
—
Zend_Search_Lucene_Storage_File
Term Dictionary index file - $_tisFile
—
Zend_Search_Lucene_Storage_File
Term Dictionary file
protected
- $_directory
—
Zend_Search_Lucene_Storage_Directory
File system adapter. - $_docCount
—
integer
Number of docs in a segment - $_fdtFile
—
Zend_Search_Lucene_Storage_File
'.fdt' file - Stored Fields, the field data. - $_fdxFile
—
Zend_Search_Lucene_Storage_File
'.fdx' file - Stored Fields, the field index. - $_fields
—
array
Segment fields. Array of Zend_Search_Lucene_Index_FieldInfo objects for this segment - $_files
—
unknown_type
List of the index files. - $_name
—
string
Segment name - $_norms
—
array
Normalization factors.
public
- $indexInterval
—
integer
Expert: The fraction of terms in the "dictionary" which should be stored in RAM. Smaller values use more memory, but make searching slightly faster, while larger values use less memory and make searching slightly slower. Searching is typically not dominated by dictionary lookup, so tweaking this is rarely useful. - $maxSkipLevels
—
integer
Expert: The maximum number of skip levels. Smaller values result in slightly smaller indexes, but slower skipping in big posting lists. - $skipInterval
—
integer
Expert: The fraction of TermDocs entries stored in skip tables.
Methods
protected
- _dumpFNM() — Dump Field Info (.fnm) segment file
- _dumpTermDictEntry() — Dump Term Dictionary segment file entry.
- _generateCFS() — Generate compound index file
public
- __construct() — Object constructor.
- addField() — Add field to the segment
- addFieldInfo() — Add fieldInfo to the segment
- addStoredFields() — Add stored fields information
- addTerm() — Add term
- close() — Close segment, write it to disk and return segment info
- closeDictionaryFiles() — Close dictionary
- count() — Returns the total number of documents in this segment.
- getFieldInfos() — Returns array of FieldInfo objects.
- getName() — Return segment name
- initializeDictionaryFiles() — Create dicrionary, frequency and positions files and write necessary headers