Abstract Class Zend_Search_Lucene_Index_SegmentWriter

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

Located in /Zend/Search/Lucene/Index/SegmentWriter.php (line 43)


	
			
Direct descendents
Variable Summary
Method Summary
 Zend_Search_Lucene_Index_SegmentWriter __construct (Zend_Search_Lucene_Storage_Directory $directory, string $name)
 void addStoredFields (array $storedFields)
 void addTerm ( $termEntry, array $termDocs, Zend_Search_Lucene_Index_Term $term)
 integer count ()
 array getFieldInfos ()
 void _dumpFNM ()
 void _generateCFS ()
Variables
static integer $indexInterval = 128 (line 54)

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.

  • access: public
static integer $skipInterval = 0x7FFFFFFF (line 67)

Expert: The fraction of TermDocs entries stored in skip tables.

Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while smaller values result in bigger indexes, less acceleration and more accelerable cases. More detailed experiments would be useful here.

0x0x7FFFFFFF indicates that we don't use skip data Default value is 16

  • access: public
Zend_Search_Lucene_Storage_Directory $_directory (line 88)

File system adapter.

  • access: protected
integer $_docCount = 0 (line 74)

Number of docs in a segment

  • access: protected
Zend_Search_Lucene_Storage_File $_fdtFile = null (line 130)

'.fdt' file - Stored Fields, the field data.

  • access: protected
Zend_Search_Lucene_Storage_File $_fdxFile = null (line 123)

'.fdx' file - Stored Fields, the field index.

  • access: protected
array $_fields = array() (line 103)

Segment fields. Array of Zend_Search_Lucene_Index_FieldInfo objects for this segment

  • access: protected
unknown_type $_files = array() (line 96)

List of the index files.

Used for automatic compound file generation

  • access: protected
string $_name (line 81)

Segment name

  • access: protected
array $_norms = array() (line 115)

Normalization factors.

An array fieldName => normVector normVector is a binary string. Each byte corresponds to an indexed document in a segment and encodes normalization factor (float value, encoded by Zend_Search_Lucene_Search_Similarity::encodeNorm())

  • access: protected
Methods
Constructor __construct (line 139)

Object constructor.

  • access: public
Zend_Search_Lucene_Index_SegmentWriter __construct (Zend_Search_Lucene_Storage_Directory $directory, string $name)

Redefined in descendants as:
addField (line 154)

Add field to the segment

Returns actual field number

  • access: public
integer addField (Zend_Search_Lucene_Field $field)
addFieldInfo (line 181)

Add fieldInfo to the segment

Returns actual field number

  • access: public
integer addFieldInfo (Zend_Search_Lucene_Index_FieldInfo $fieldInfo)
addStoredFields (line 215)

Add stored fields information

  • access: public
void addStoredFields (array $storedFields)
  • array $storedFields: array of Zend_Search_Lucene_Field objects
addTerm (line 406)

Add term

Term positions is an array( docId => array(pos1, pos2, pos3, ...), ... )

  • access: public
void addTerm ( $termEntry, array $termDocs, Zend_Search_Lucene_Index_Term $term)
close (line 573)

Close segment, write it to disk and return segment info

  • access: public
  • abstract:

Redefined in descendants as:
closeDictionaryFiles (line 460)

Close dictionary

  • access: public
void closeDictionaryFiles ()
count (line 249)

Returns the total number of documents in this segment.

  • access: public
integer count ()
getFieldInfos (line 205)

Returns array of FieldInfo objects.

  • access: public
array getFieldInfos ()
initializeDictionaryFiles (line 357)

Create dicrionary, frequency and positions files and write necessary headers

  • access: public
void initializeDictionaryFiles ()
_dumpFNM (line 257)

Dump Field Info (.fnm) segment file

  • access: protected
void _dumpFNM ()
_dumpTermDictEntry (line 480)

Dump Term Dictionary segment file entry.

Used to write entry to .tis or .tii files

  • access: protected
void _dumpTermDictEntry (Zend_Search_Lucene_Storage_File $dicFile,  &$prevTerm, Zend_Search_Lucene_Index_Term $term,  &$prevTermInfo, Zend_Search_Lucene_Index_TermInfo $termInfo, Zend_Search_Lucene_Index_Term $prevTerm, Zend_Search_Lucene_Index_TermInfo $prevTermInfo)
_generateCFS (line 532)

Generate compound index file

  • access: protected
void _generateCFS ()

Documentation generated on Thu, 18 Jan 2007 09:58:59 -0800 by phpDocumentor 1.3.1