Search/Lucene/Index/SegmentWriter/StreamWriter.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Search_Lucene  
Subpackage
Index  
Version
$Id: StreamWriter.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Search_Lucene_Index_SegmentWriter_StreamWriter

Package: Zend\Search\Lucene\Index

Parent(s)
\Zend_Search_Lucene_Index_SegmentWriter
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected\Zend_Search_Lucene_Storage_Directory $_directory =
inherited

File system adapter.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_directory
Propertyprotectedinteger $_docCount = 0
inherited

Number of docs in a segment

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_docCount
Default value0Details
Type
integer
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$_docCount  
Propertyprotected\Zend_Search_Lucene_Storage_File $_fdtFile = null
inherited

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

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_fdtFile
Propertyprotected\Zend_Search_Lucene_Storage_File $_fdxFile = null
inherited

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

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_fdxFile
Propertyprotectedarray $_fields = array()
inherited

Segment fields.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_fields

Array of Zend_Search_Lucene_Index_FieldInfo objects for this segment

Default valuearray()Details
Type
array
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$_fields  
Propertyprotected\unknown_type $_files = array()
inherited

List of the index files.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_files

Used for automatic compound file generation

Default valuearray()Details
Type
\unknown_type
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$_files  
Propertyprivate\Zend_Search_Lucene_Storage_File $_frqFile = null
inherited

Frequencies file

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_frqFile
Propertyprivateinteger $_lastIndexPosition =
inherited

Last term dictionary file position

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_lastIndexPosition
Details
Type
integer
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$_lastIndexPosition  
Propertyprotectedstring $_name =
inherited

Segment name

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_name
Details
Type
string
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$_name  
Propertyprotectedarray $_norms = array()
inherited

Normalization factors.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_norms

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

Default valuearray()Details
Type
array
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$_norms  
Propertyprivate\Zend_Search_Lucene_Index_Term $_prevIndexTerm =
inherited

Last saved index term

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prevIndexTerm
Propertyprivate\Zend_Search_Lucene_Index_TermInfo $_prevIndexTermInfo =
inherited

Last saved index term info

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prevIndexTermInfo
Propertyprivate\Zend_Search_Lucene_Index_Term $_prevTerm =
inherited

Last saved term

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prevTerm
Propertyprivate\Zend_Search_Lucene_Index_TermInfo $_prevTermInfo =
inherited

Last saved term info

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prevTermInfo
Propertyprivate\Zend_Search_Lucene_Storage_File $_prxFile = null
inherited

Positions file

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prxFile
Propertyprivateinteger $_termCount =
inherited

Number of written terms

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_termCount
Details
Type
integer
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$_termCount  
Propertyprivate\Zend_Search_Lucene_Storage_File $_tiiFile = null
inherited

Term Dictionary index file

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_tiiFile
Propertyprivate\Zend_Search_Lucene_Storage_File $_tisFile = null
inherited

Term Dictionary file

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_tisFile
Propertypublicinteger $indexInterval = 128
staticinherited

Expert: The fraction of terms in the "dictionary" which should be stored in RAM.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$indexInterval

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.

Default value128Details
Type
integer
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$indexInterval  
Propertypublicinteger $maxSkipLevels = 0
staticinherited

Expert: The maximum number of skip levels.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$maxSkipLevels

Smaller values result in slightly smaller indexes, but slower skipping in big posting lists.

0 indicates that we don't use skip data

Note: not used in current implementation

Default value0Details
Type
integer
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$maxSkipLevels  
Propertypublicinteger $skipInterval = 2147483647
staticinherited

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

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$skipInterval

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.

0x7FFFFFFF indicates that we don't use skip data

Note: not used in current implementation

Default value2147483647Details
Type
integer
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$skipInterval  

Methods

methodpublic__construct(\Zend_Search_Lucene_Storage_Directory $directory, string $name) : void

Object constructor.

Parameters
Name Type Description
$directory \Zend_Search_Lucene_Storage_Directory
$name string
methodprotected_dumpFNM() : void
inherited

Dump Field Info (.fnm) segment file

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::_dumpFNM()
methodprotected_dumpTermDictEntry(\Zend_Search_Lucene_Storage_File $dicFile, \Zend_Search_Lucene_Index_Term $prevTerm, \Zend_Search_Lucene_Index_Term $term, \Zend_Search_Lucene_Index_TermInfo $prevTermInfo, \Zend_Search_Lucene_Index_TermInfo $termInfo) : void
inherited

Dump Term Dictionary segment file entry.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::_dumpTermDictEntry()

Used to write entry to .tis or .tii files

Parameters
Name Type Description
$dicFile \Zend_Search_Lucene_Storage_File
$prevTerm \Zend_Search_Lucene_Index_Term
$term \Zend_Search_Lucene_Index_Term
$prevTermInfo \Zend_Search_Lucene_Index_TermInfo
$termInfo \Zend_Search_Lucene_Index_TermInfo
methodprotected_generateCFS() : void
inherited

Generate compound index file

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::_generateCFS()
methodpublicaddField(\Zend_Search_Lucene_Field $field) : integer
inherited

Add field to the segment

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::addField()

Returns actual field number

Parameters
Name Type Description
$field \Zend_Search_Lucene_Field
Returns
Type Description
integer
methodpublicaddFieldInfo(\Zend_Search_Lucene_Index_FieldInfo $fieldInfo) : integer
inherited

Add fieldInfo to the segment

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::addFieldInfo()

Returns actual field number

Parameters
Name Type Description
$fieldInfo \Zend_Search_Lucene_Index_FieldInfo
Returns
Type Description
integer
methodpublicaddNorm( $fieldName,  $normVector) : void

Parameters
Name Type Description
$fieldName
$normVector
methodpublicaddStoredFields(array $storedFields) : void
inherited

Add stored fields information

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::addStoredFields()
Parameters
Name Type Description
$storedFields array

array of Zend_Search_Lucene_Field objects

methodpublicaddTerm(\Zend_Search_Lucene_Index_Term $termEntry, array $termDocs) : void
inherited

Add term

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::addTerm()

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

Parameters
Name Type Description
$termEntry \Zend_Search_Lucene_Index_Term
$termDocs array
methodpublicclose() : \Zend_Search_Lucene_Index_SegmentInfo

Close segment, write it to disk and return segment info

Returns
Type Description
\Zend_Search_Lucene_Index_SegmentInfo
methodpubliccloseDictionaryFiles() : void
inherited

Close dictionary

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::closeDictionaryFiles()
methodpubliccount() : integer
inherited

Returns the total number of documents in this segment.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::count()
Returns
Type Description
integer
methodpubliccreateStoredFieldsFiles() : void

Create stored fields files and open them for write

methodpublicgetFieldInfos() : array
inherited

Returns array of FieldInfo objects.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::getFieldInfos()
Returns
Type Description
array
methodpublicgetName() : string
inherited

Return segment name

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::getName()
Returns
Type Description
string
methodpublicinitializeDictionaryFiles() : void
inherited

Create dicrionary, frequency and positions files and write necessary headers

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::initializeDictionaryFiles()
Documentation was generated by phpDocumentor 2.0.0a8.