Docs For Class Zend_Search_Lucene_Index_SegmentInfo

## Class Zend_Search_Lucene_Index_SegmentInfo

Description

- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Search/Lucene/Index/SegmentInfo.php (line 34)

Method Summary
Zend_Search_Lucene_Index_SegmentInfo __construct (string $name, integer $docCount, Zend_Search_Lucene_Storage_Directory $directory)
integer count ()
Zend_Search_Lucene_Index_Term|null currentTerm (Zend_Search_Lucene_Index_Term $term)
array currentTermPositions ()
void delete (mixed $id)
ZSearchFieldInfo getField (integer $fieldNum)
array getFieldInfos ()
integer getFieldNum (string $fieldName)
array getFields ([boolean $indexed = false])
string getName ()
Zend_Search_Lucene_Index_TermInfo getTermInfo (Zend_Search_Lucene_Index_Term $term)
boolean hasDeletions ()
boolean isDeleted (mixed $id)
Zend_Search_Lucene_Index_Term|null nextTerm ()
string norm (integer $id, string $fieldName)
string normVector (string $fieldName)
Zend_Search_Lucene_Storage_File openCompoundFile (string $extension, [boolean $shareHandler = true])
integer reset ([integer $startId = 0], [boolean $compact = false])
void writeChanges ()
void _loadDictionary ()
Methods
Constructor __construct (line 134)

Zend_Search_Lucene_Index_SegmentInfo constructor needs Segmentname, Documents count and Directory as a parameter.

- access: public

Zend_Search_Lucene_Index_SegmentInfo __construct (string $name, integer $docCount, Zend_Search_Lucene_Storage_Directory $directory)

- string $name
- integer $docCount
- Zend_Search_Lucene_Storage_Directory $directory

count (line 300)

Returns the total number of documents in this segment.

- access: public

integer count ()
currentTerm (line 841)

Returns term in current position

- access: public

Zend_Search_Lucene_Index_Term|null currentTerm (Zend_Search_Lucene_Index_Term $term)

- Zend_Search_Lucene_Index_Term $term

currentTermPositions (line 853)

Returns an array of all term positions in the documents.

Return array structure: array( docId => array( pos1, pos2, ...), ...)

- access: public

array currentTermPositions ()
delete (line 547)

Deletes a document from the index segment.

$id is an internal document id

- access: public

void delete (mixed $id)
getField (line 262)

Returns field info for specified field

- access: public

ZSearchFieldInfo getField (integer $fieldNum)

- integer $fieldNum

getFieldInfos (line 290)

Returns array of FieldInfo objects.

- access: public

array getFieldInfos ()
getFieldNum (line 245)

Returns field index or -1 if field is not found

- access: public

integer getFieldNum (string $fieldName)

- string $fieldName

getFields (line 274)

Returns array of fields.

if $indexed parameter is true, then returns only indexed fields.

- access: public

array getFields ([boolean $indexed = false])

- boolean $indexed

getName (line 373)

Return segment name

- access: public

string getName ()
getTermInfo (line 385)

Scans terms dictionary and returns term info

- access: public

Zend_Search_Lucene_Index_TermInfo getTermInfo (Zend_Search_Lucene_Index_Term $term)

- Zend_Search_Lucene_Index_Term $term

hasDeletions (line 535)

Returns true if any documents have been deleted from this index segment.

- access: public

boolean hasDeletions ()
isDeleted (line 571)

Checks, that document is deleted

- access: public

boolean isDeleted (mixed $id)
nextTerm (line 766)

Scans terms dictionary and returns next term

- access: public

Zend_Search_Lucene_Index_Term|null nextTerm ()
norm (line 490)

Returns normalization factor for specified documents

- access: public

string norm (integer $id, string $fieldName)

- integer $id
- string $fieldName

normVector (line 511)

Returns norm vector, encoded in a byte string

- access: public

string normVector (string $fieldName)

- string $fieldName

openCompoundFile (line 220)

Opens index file stoted within compound index file

- access: public
- throws: Zend_Search_Lucene_Exception

Zend_Search_Lucene_Storage_File openCompoundFile (string $extension, [boolean $shareHandler = true])

- string $extension
- boolean $shareHandler

reset (line 718)

Reset terms stream

$startId - id for the fist document $compact - remove deleted documents

Returns start document id for the next segment

- access: public
- throws: Zend_Search_Lucene_Exception

integer reset (integer $startId, [boolean $compact = false])

- integer $startId
- boolean $compact

writeChanges (line 588)

Write changes if it's necessary.

- access: public

void writeChanges ()
_loadDictionary (line 320)

Loads Term dictionary from TermInfoIndex file

- access: protected

void _loadDictionary ()

Documentation generated on Sun, 29 Oct 2006 21:27:30 -0600 by phpDocumentor 1.3.0RC6