Search/Lucene/Index/SegmentInfo.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Search_Lucene
- Subpackage
- Index
- Version
- $Id$
\Zend_Search_Lucene_Index_SegmentInfo
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
FULL_SCAN_VS_FETCH_BOUNDARY
= 5Properties

integer $_delGen- Type
- integer

mixed $_deleted = nullnullDetails- Type
- mixed

array|null $_docMap = nullnullDetails- Type
- array | null

array $_fields- Type
- array

array $_fieldsDicPositions- Type
- array

\Zend_Search_Lucene_Storage_File $_frqFile = nullnullDetails
boolean $_hasSingleNormFile- Type
- boolean

boolean $_isCompound- Type
- boolean

\Zend_Search_Lucene_Index_TermInfo $_lastTermInfo = nullnullDetails
array|null $_lastTermPositions- Type
- array | null

array $_norms = array()array()Details- Type
- array

\Zend_Search_Lucene_Storage_File $_prxFile = nullnullDetails
array $_segFileSizes- Type
- array

array $_segFiles- Type
- array

array $_termDictionary- Type
- array

array $_termDictionaryInfos- Type
- array

array $_termInfoCache = array()array()Details- Type
- array

integer $_termsScanMode- Type
- integer

\Zend_Search_Lucene_Storage_File $_tisFile = nullnullDetailsMethods

__construct(\Zend_Search_Lucene_Storage_Directory $directory, string $name, integer $docCount, integer $delGen = 0, array | null $docStoreOptions = null, boolean $hasSingleNormFile = false, boolean $isCompound = null) : voidZend_Search_Lucene_Index_SegmentInfo constructor
| Name | Type | Description |
|---|---|---|
| $directory | \Zend_Search_Lucene_Storage_Directory | |
| $name | string | |
| $docCount | integer | |
| $delGen | integer | |
| $docStoreOptions | array | null | |
| $hasSingleNormFile | boolean | |
| $isCompound | boolean |

_detectLatestDelGen() : integerDetect latest delete generation
| Type | Description |
|---|---|
| integer |

_getFieldPosition(integer $fieldNum) : integerGet field position in a fields dictionary
| Name | Type | Description |
|---|---|---|
| $fieldNum | integer |
| Type | Description |
|---|---|
| integer |

_load21DelFile() : mixedLoad 2.1+ format detetions file
| Type | Description |
|---|---|
| mixed |

_loadDelFile() : mixedLoad detetions file
| Type | Description |
|---|---|
| mixed |
| Exception | Description |
|---|---|
| \Zend_Search_Lucene_Exception |

_loadDictionaryIndex() : voidLoad terms dictionary index
| Exception | Description |
|---|---|
| \Zend_Search_Lucene_Exception |

_loadNorm(integer $fieldNum) : voidLoad normalizatin factors from an index file
| Name | Type | Description |
|---|---|---|
| $fieldNum | integer |
| Exception | Description |
|---|---|
| \Zend_Search_Lucene_Exception |

_loadPre21DelFile() : mixedLoad pre-2.1 detetions file
| Type | Description |
|---|---|
| mixed |
| Exception | Description |
|---|---|
| \Zend_Search_Lucene_Exception |

closeTermsStream() : voidClose terms stream

compoundFileLength(string $extension) : integerGet compound file length
| Name | Type | Description |
|---|---|---|
| $extension | string |
| Type | Description |
|---|---|
| integer |

count() : integerReturns the total number of documents in this segment (including deleted documents).
| Type | Description |
|---|---|
| integer |

currentTerm() : \Zend_Search_Lucene_Index_Term | nullReturns term in current position
| Type | Description |
|---|---|
| \Zend_Search_Lucene_Index_Term | null |

currentTermPositions() : arrayReturns an array of all term positions in the documents.
| Type | Description |
|---|---|
| array |

delete( $id) : voidDeletes a document from the index segment.
| Name | Type | Description |
|---|---|---|
| $id |

getField(integer $fieldNum) : \Zend_Search_Lucene_Index_FieldInfoReturns field info for specified field
| Name | Type | Description |
|---|---|---|
| $fieldNum | integer |
| Type | Description |
|---|---|
| \Zend_Search_Lucene_Index_FieldInfo |

getFieldNum(string $fieldName) : integerReturns field index or -1 if field is not found
| Name | Type | Description |
|---|---|---|
| $fieldName | string |
| Type | Description |
|---|---|
| integer |

getFields(boolean $indexed = false) : arrayReturns array of fields.
| Name | Type | Description |
|---|---|---|
| $indexed | boolean |
| Type | Description |
|---|---|
| array |

getTermInfo(\Zend_Search_Lucene_Index_Term $term) : \Zend_Search_Lucene_Index_TermInfoScans terms dictionary and returns term info
| Name | Type | Description |
|---|---|---|
| $term | \Zend_Search_Lucene_Index_Term |
| Type | Description |
|---|---|
| \Zend_Search_Lucene_Index_TermInfo |

hasDeletions() : booleanReturns true if any documents have been deleted from this index segment.
| Type | Description |
|---|---|
| boolean |

hasSingleNormFile() : booleanReturns true if segment has single norms file.
| Type | Description |
|---|---|
| boolean |

isCompound() : booleanReturns true if segment is stored using compound segment file.
| Type | Description |
|---|---|
| boolean |

isDeleted( $id) : booleanChecks, that document is deleted
| Name | Type | Description |
|---|---|---|
| $id |
| Type | Description |
|---|---|
| boolean |

nextTerm() : \Zend_Search_Lucene_Index_Term | nullScans terms dictionary and returns next term
| Type | Description |
|---|---|
| \Zend_Search_Lucene_Index_Term | null |

norm(integer $id, string $fieldName) : floatReturns normalization factor for specified documents
| Name | Type | Description |
|---|---|---|
| $id | integer | |
| $fieldName | string |
| Type | Description |
|---|---|
| float |

normVector(string $fieldName) : stringReturns norm vector, encoded in a byte string
| Name | Type | Description |
|---|---|---|
| $fieldName | string |
| Type | Description |
|---|---|
| string |

numDocs() : integerReturns the total number of non-deleted documents in this segment.
| Type | Description |
|---|---|
| integer |

openCompoundFile(string $extension, boolean $shareHandler = true) : \Zend_Search_Lucene_Storage_FileOpens index file stoted within compound index file
| Name | Type | Description |
|---|---|---|
| $extension | string | |
| $shareHandler | boolean |
| Type | Description |
|---|---|
| \Zend_Search_Lucene_Storage_File |
| Exception | Description |
|---|---|
| \Zend_Search_Lucene_Exception |

resetTermsStream() : integerReset terms stream
| Type | Description |
|---|---|
| integer |
| Exception | Description |
|---|---|
| \Zend_Search_Lucene_Exception |

skipTo(\Zend_Search_Lucene_Index_Term $prefix) : voidSkip terms stream up to the specified term preffix.
| Name | Type | Description |
|---|---|---|
| $prefix | \Zend_Search_Lucene_Index_Term |
| Exception | Description |
|---|---|
| \Zend_Search_Lucene_Exception |

termDocs(\Zend_Search_Lucene_Index_Term $term, integer $shift = 0, \Zend_Search_Lucene_Index_DocsFilter | null $docsFilter = null) : arrayReturns IDs of all the documents containing term.
| Name | Type | Description |
|---|---|---|
| $term | \Zend_Search_Lucene_Index_Term | |
| $shift | integer | |
| $docsFilter | \Zend_Search_Lucene_Index_DocsFilter | null |
| Type | Description |
|---|---|
| array |

termFreqs(\Zend_Search_Lucene_Index_Term $term, integer $shift = 0, \Zend_Search_Lucene_Index_DocsFilter | null $docsFilter = null) : \Zend_Search_Lucene_Index_TermInfoReturns term freqs array.
| Name | Type | Description |
|---|---|---|
| $term | \Zend_Search_Lucene_Index_Term | |
| $shift | integer | |
| $docsFilter | \Zend_Search_Lucene_Index_DocsFilter | null |
| Type | Description |
|---|---|
| \Zend_Search_Lucene_Index_TermInfo |

termPositions(\Zend_Search_Lucene_Index_Term $term, integer $shift = 0, \Zend_Search_Lucene_Index_DocsFilter | null $docsFilter = null) : \Zend_Search_Lucene_Index_TermInfoReturns term positions array.
| Name | Type | Description |
|---|---|---|
| $term | \Zend_Search_Lucene_Index_Term | |
| $shift | integer | |
| $docsFilter | \Zend_Search_Lucene_Index_DocsFilter | null |
| Type | Description |
|---|---|
| \Zend_Search_Lucene_Index_TermInfo |