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


	
			
Method Summary
 Zend_Search_Lucene_Index_SegmentInfo __construct (string $name, integer $docCount, Zend_Search_Lucene_Storage_Directory $directory)
 integer compoundFileLength (string $extension)
 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)
 integer numDocs ()
 Zend_Search_Lucene_Storage_File openCompoundFile (string $extension, [boolean $shareHandler = true])
 integer reset ([integer $startId = 0], [boolean $compact = false])
 void writeChanges ()
Methods
Constructor __construct (line 157)

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)
compoundFileLength (line 273)

Get compound file length

  • access: public
integer compoundFileLength (string $extension)
  • string $extension
count (line 351)

Returns the total number of documents in this segment (including deleted documents).

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

Returns term in current position

  • access: public
currentTermPositions (line 951)

Returns an array of all term positions in the documents.

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

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

Deletes a document from the index segment.

$id is an internal document id

  • access: public
void delete (integer $id)
  • integer $id
getField (line 313)

Returns field info for specified field

  • access: public
ZSearchFieldInfo getField (integer $fieldNum)
  • integer $fieldNum
getFieldInfos (line 341)

Returns array of FieldInfo objects.

  • access: public
array getFieldInfos ()
getFieldNum (line 296)

Returns field index or -1 if field is not found

  • access: public
integer getFieldNum (string $fieldName)
  • string $fieldName
getFields (line 325)

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

Return segment name

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

Scans terms dictionary and returns term info

  • access: public
hasDeletions (line 628)

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

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

Checks, that document is deleted

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

Scans terms dictionary and returns next term

  • access: public
norm (line 583)

Returns normalization factor for specified documents

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

Returns norm vector, encoded in a byte string

  • access: public
string normVector (string $fieldName)
  • string $fieldName
numDocs (line 379)

Returns the total number of non-deleted documents in this segment.

  • access: public
integer numDocs ()
openCompoundFile (line 248)

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

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

Write changes if it's necessary.

  • access: public
void writeChanges ()

Documentation generated on Wed, 21 Feb 2007 11:59:11 -0800 by phpDocumentor 1.3.1