\Zend_Search_Lucene_Index_SegmentInfo
- 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_SegmentInfo
implements
Zend_Search_Lucene_Index_TermsStream_Interface
{
- // constants
- const FULL_SCAN_VS_FETCH_BOUNDARY = 5;
- const SM_TERMS_ONLY = 0;
- const SM_FULL_INFO = 1;
- const SM_MERGE_INFO = 2;
- // members
- private $_docCount;
- private $_name;
- private $_termDictionary;
- private $_termDictionaryInfos;
- private $_fields;
- private $_fieldsDicPositions;
- private $_segFiles;
- private $_segFileSizes;
- private $_delGen;
- private $_hasSingleNormFile;
- private $_isCompound;
- private Zend_Search_Lucene_Storage_Directory_Filesystem $_directory;
- private array $_norms = ;
- private $_deleted = NULL;
- private boolean $_deletedDirty = false;
- private $_usesSharedDocStore;
- private $_sharedDocStoreOptions;
- private array $_termInfoCache = ;
- private Zend_Search_Lucene_Storage_File $_tisFile = NULL;
- private $_tisFileOffset;
- private Zend_Search_Lucene_Storage_File $_frqFile = NULL;
- private $_frqFileOffset;
- private Zend_Search_Lucene_Storage_File $_prxFile = NULL;
- private $_prxFileOffset;
- private integer $_termCount = 0;
- private integer $_termNum = 0;
- private $_indexInterval;
- private $_skipInterval;
- private Zend_Search_Lucene_Index_TermInfo $_lastTermInfo = NULL;
- private Zend_Search_Lucene_Index_Term $_lastTerm = NULL;
- private array|null $_docMap = NULL;
- private array|null $_lastTermPositions;
- private $_termsScanMode;
- // methods
- public void __construct()
- private mixed _loadDelFile()
- private mixed _loadPre21DelFile()
- private mixed _load21DelFile()
- public Zend_Search_Lucene_Storage_File openCompoundFile()
- public integer compoundFileLength()
- public integer getFieldNum()
- public Zend_Search_Lucene_Index_FieldInfo getField()
- public array getFields()
- public array getFieldInfos()
- public integer getDelGen()
- public integer count()
- private integer _deletedCount()
- public integer numDocs()
- private integer _getFieldPosition()
- public string getName()
- private void _cleanUpTermInfoCache()
- private void _loadDictionaryIndex()
- public Zend_Search_Lucene_Index_TermInfo getTermInfo()
- public array termDocs()
- public Zend_Search_Lucene_Index_TermInfo termFreqs()
- public Zend_Search_Lucene_Index_TermInfo termPositions()
- private void _loadNorm()
- public float norm()
- public string normVector()
- public boolean hasDeletions()
- public boolean hasSingleNormFile()
- public boolean isCompound()
- public void delete()
- public boolean isDeleted()
- private integer _detectLatestDelGen()
- public void writeChanges()
- public integer resetTermsStream()
- public void skipTo()
- public Zend_Search_Lucene_Index_Term|null nextTerm()
- public void closeTermsStream()
- public Zend_Search_Lucene_Index_Term|null currentTerm()
- public array currentTermPositions()
Hierarchy
Constants
Name | Value |
---|---|
FULL_SCAN_VS_FETCH_BOUNDARY | 5 |
SM_TERMS_ONLY | 0 |
SM_FULL_INFO | 1 |
SM_MERGE_INFO | 2 |
Members
private
- $_delGen
—
integer
Delete file generation number - $_deleted
—
mixed
List of deleted documents. - $_deletedDirty
—
boolean
$this->_deleted update flag - $_directory
—
Zend_Search_Lucene_Storage_Directory_Filesystem
File system adapter. - $_docCount
—
integer
Number of docs in a segment - $_docMap
—
array|null
Map of the document IDs Used to get new docID after removing deleted documents. - $_fields
—
array
Segment fields. Array of Zend_Search_Lucene_Index_FieldInfo objects for this segment - $_fieldsDicPositions
—
array
Field positions in a dictionary. - $_frqFile
—
Zend_Search_Lucene_Storage_File
Frequencies File object for stream like terms reading - $_frqFileOffset
—
integer
Actual offset of the .frq file data - $_hasSingleNormFile
—
boolean
Segment has single norms file - $_indexInterval
—
integer
Segment index interval - $_isCompound
—
boolean
Use compound segment file (*.cfs) to collect all other segment files (excluding .del files) - $_lastTerm
—
Zend_Search_Lucene_Index_Term
Last Term in a terms stream - $_lastTermInfo
—
Zend_Search_Lucene_Index_TermInfo
Last TermInfo in a terms stream - $_lastTermPositions
—
array|null
An array of all term positions in the documents. - $_name
—
string
Segment name - $_norms
—
array
Normalization factors. - $_prxFile
—
Zend_Search_Lucene_Storage_File
Positions File object for stream like terms reading - $_prxFileOffset
—
integer
Actual offset of the .prx file in the compound file - $_segFileSizes
—
array
Associative array where the key is the file name and the value is file size (.csf). - $_segFiles
—
array
Associative array where the key is the file name and the value is data offset in a compound segment file (.csf). - $_skipInterval
—
integer
Segment skip interval - $_termCount
—
integer
Actual number of terms in term stream - $_termDictionary
—
array
Term Dictionary Index - $_termDictionaryInfos
—
array
Term Dictionary Index TermInfos - $_termInfoCache
—
array
TermInfo cache - $_termNum
—
integer
Overall number of terms in term stream - $_termsScanMode
—
integer
Terms scan mode - $_tisFile
—
Zend_Search_Lucene_Storage_File
Term Dictionary File object for stream like terms reading - $_tisFileOffset
—
integer
Actual offset of the .tis file data
Methods
private
- _cleanUpTermInfoCache()
- _deletedCount() — Returns number of deleted documents.
- _detectLatestDelGen() — Detect latest delete generation
- _getFieldPosition() — Get field position in a fields dictionary
- _load21DelFile() — Load 2.1+ format detetions file
- _loadDelFile() — Load detetions file
- _loadDictionaryIndex() — Load terms dictionary index
- _loadNorm() — Load normalizatin factors from an index file
- _loadPre21DelFile() — Load pre-2.1 detetions file
public
- __construct() — Zend_Search_Lucene_Index_SegmentInfo constructor
- closeTermsStream() — Close terms stream
- compoundFileLength() — Get compound file length
- count() — Returns the total number of documents in this segment (including deleted documents).
- currentTerm() — Returns term in current position
- currentTermPositions() — Returns an array of all term positions in the documents.
- delete() — Deletes a document from the index segment.
- getDelGen() — Returns actual deletions file generation number.
- getField() — Returns field info for specified field
- getFieldInfos() — Returns array of FieldInfo objects.
- getFieldNum() — Returns field index or -1 if field is not found
- getFields() — Returns array of fields.
- getName() — Return segment name
- getTermInfo() — Scans terms dictionary and returns term info
- hasDeletions() — Returns true if any documents have been deleted from this index segment.
- hasSingleNormFile() — Returns true if segment has single norms file.
- isCompound() — Returns true if segment is stored using compound segment file.
- isDeleted() — Checks, that document is deleted
- nextTerm() — Scans terms dictionary and returns next term
- norm() — Returns normalization factor for specified documents
- normVector() — Returns norm vector, encoded in a byte string
- numDocs() — Returns the total number of non-deleted documents in this segment.
- openCompoundFile() — Opens index file stoted within compound index file
- resetTermsStream() — Reset terms stream
- skipTo() — Skip terms stream up to specified term preffix.
- termDocs() — Returns IDs of all the documents containing term.
- termFreqs() — Returns term freqs array.
- termPositions() — Returns term positions array.
- writeChanges() — Write changes if it's necessary.