Class Zend_Search_Lucene_Index_SegmentInfo

Description
  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 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 ()
 void delete (integer $id)
 ZSearchFieldInfo getField (integer $fieldNum)
 array getFieldInfos ()
 integer getFieldNum (string $fieldName)
 array getFields ([boolean $indexed = false])
 string getName ()
 boolean hasDeletions ()
 boolean isDeleted (integer $id)
 float 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)
count (line 300)

Returns the total number of documents in this segment.

  • access: public
integer count ()
currentTerm (line 861)

Returns term in current position

  • access: public
currentTermPositions (line 873)

Returns an array of all term positions in the documents.

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

  • access: public
array currentTermPositions ()
delete (line 562)

Deletes a document from the index segment.

$id is an internal document id

  • access: public
void delete (integer $id)
  • integer $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 388)

Return segment name

  • access: public
string getName ()
getTermInfo (line 400)

Scans terms dictionary and returns term info

  • access: public
hasDeletions (line 550)

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

  • access: public
boolean hasDeletions ()
isDeleted (line 586)

Checks, that document is deleted

  • access: public
boolean isDeleted (integer $id)
  • integer $id
nextTerm (line 781)

Scans terms dictionary and returns next term

  • access: public
norm (line 505)

Returns normalization factor for specified documents

  • access: public
float norm (integer $id, string $fieldName)
  • integer $id
  • string $fieldName
normVector (line 526)

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

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

Write changes if it's necessary.

  • access: public
void writeChanges ()
_loadDictionary (line 322)

Loads Term dictionary from TermInfoIndex file

  • access: protected
  • throws: Zend_Search_Lucene_Exception
void _loadDictionary ()

Documentation generated on Thu, 18 Jan 2007 09:58:53 -0800 by phpDocumentor 1.3.1