Search/Lucene/Index/SegmentWriter/StreamWriter.php

Show: PublicProtectedPrivateinherited
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 license@zend.com 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

>VPropertyprotected\Zend_Search_Lucene_Storage_Directory $_directory
inherited
File system adapter.
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_directory
>VPropertyprotectedinteger $_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  
>VPropertyprotected\Zend_Search_Lucene_Storage_File $_fdtFile = null
inherited
'.fdt' file - Stored Fields, the field data.
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_fdtFile
>VPropertyprotected\Zend_Search_Lucene_Storage_File $_fdxFile = null
inherited
'.fdx' file - Stored Fields, the field index.
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_fdxFile
>VPropertyprotectedarray $_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  
>VPropertyprotected\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  
>VPropertyprivate\Zend_Search_Lucene_Storage_File $_frqFile = null
inherited
Frequencies file
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_frqFile
>VPropertyprivateinteger $_lastIndexPosition
inherited
Last term dictionary file position
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_lastIndexPosition
>VPropertyprotectedstring $_name
inherited
Segment name
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_name
Details
Type
string
Inherited_from
\Zend_Search_Lucene_Index_SegmentWriter::$$_name  
>VPropertyprotectedarray $_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  
>VPropertyprivate\Zend_Search_Lucene_Index_Term $_prevIndexTerm
inherited
Last saved index term
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prevIndexTerm
>VPropertyprivate\Zend_Search_Lucene_Index_TermInfo $_prevIndexTermInfo
inherited
Last saved index term info
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prevIndexTermInfo
>VPropertyprivate\Zend_Search_Lucene_Index_Term $_prevTerm
inherited
Last saved term
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prevTerm
>VPropertyprivate\Zend_Search_Lucene_Index_TermInfo $_prevTermInfo
inherited
Last saved term info
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prevTermInfo
>VPropertyprivate\Zend_Search_Lucene_Storage_File $_prxFile = null
inherited
Positions file
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_prxFile
>VPropertyprivateinteger $_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  
>VPropertyprivate\Zend_Search_Lucene_Storage_File $_tiiFile = null
inherited
Term Dictionary index file
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_tiiFile
>VPropertyprivate\Zend_Search_Lucene_Storage_File $_tisFile = null
inherited
Term Dictionary file
Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::$$_tisFile
>VPropertypublicinteger $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  
>VPropertypublicinteger $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  
>VPropertypublicinteger $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
NameTypeDescription
$directory\Zend_Search_Lucene_Storage_Directory
$namestring
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
NameTypeDescription
$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
NameTypeDescription
$field\Zend_Search_Lucene_Field
Returns
TypeDescription
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
NameTypeDescription
$fieldInfo\Zend_Search_Lucene_Index_FieldInfo
Returns
TypeDescription
integer
methodpublicaddNorm( $fieldName,  $normVector) : void

Parameters
NameTypeDescription
$fieldName
$normVector
methodpublicaddStoredFields(array $storedFields) : void
inherited

Add stored fields information

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::addStoredFields()
Parameters
NameTypeDescription
$storedFieldsarray

array of Zend_Search_Lucene_Field objects

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

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

Parameters
NameTypeDescription
$termEntry\Zend_Search_Lucene_Index_Term
$termDocsarray
methodpublicclose() : \Zend_Search_Lucene_Index_SegmentInfo

Close segment, write it to disk and return segment info

methodpubliccloseDictionaryFiles() : void
methodpubliccount() : integer
inherited

Returns the total number of documents in this segment.

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::count()
Returns
TypeDescription
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
TypeDescription
array
methodpublicgetName() : string
inherited

Return segment name

Inherited from: \Zend_Search_Lucene_Index_SegmentWriter::getName()
Returns
TypeDescription
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.0a12.