HumHub Documentation (unofficial)

AbstractSegmentWriter
in package

AbstractYes
Tags
category

Zend

subpackage

Index

Table of Contents

Properties

$indexInterval  : int
Expert: The fraction of terms in the "dictionary" which should be stored in RAM. Smaller values use more memory, but make searching slightly faster, while larger values use less memory and make searching slightly slower. Searching is typically not dominated by dictionary lookup, so tweaking this is rarely useful.
$maxSkipLevels  : int
Expert: The maximum number of skip levels. Smaller values result in slightly smaller indexes, but slower skipping in big posting lists.
$skipInterval  : int
Expert: The fraction of TermDocs entries stored in skip tables.
$_directory  : DirectoryInterface
File system adapter.
$_docCount  : int
Number of docs in a segment
$_fdtFile  : FileInterface
'.fdt' file - Stored Fields, the field data.
$_fdxFile  : FileInterface
'.fdx' file - Stored Fields, the field index.
$_fields  : array<string|int, mixed>
Segment fields. Array of Zend_Search_Lucene_Index_FieldInfo objects for this segment
$_files  : array<string|int, mixed>
List of the index files.
$_name  : string
Segment name
$_norms  : array<string|int, mixed>
Normalization factors.
$_frqFile  : FileInterface
Frequencies file
$_lastIndexPosition  : int
Last term dictionary file position
$_prevIndexTerm  : Term
Last saved index term
$_prevIndexTermInfo  : TermInfo
Last saved index term info
$_prevTerm  : Term
Last saved term
$_prevTermInfo  : TermInfo
Last saved term info
$_prxFile  : FileInterface
Positions file
$_termCount  : int
Number of written terms
$_tiiFile  : FileInterface
Term Dictionary index file
$_tisFile  : FileInterface
Term Dictionary file

Methods

__construct()  : mixed
Object constructor.
addField()  : int
Add field to the segment
addFieldInfo()  : int
Add fieldInfo to the segment
addStoredFields()  : void
Add stored fields information
addTerm()  : void
Add term
close()  : SegmentInfo
Close segment, write it to disk and return segment info
closeDictionaryFiles()  : void
Close dictionary
count()  : int
Returns the total number of documents in this segment.
getFieldInfos()  : array<string|int, mixed>
Returns array of FieldInfo objects.
getName()  : string
Return segment name
initializeDictionaryFiles()  : void
Create dicrionary, frequency and positions files and write necessary headers
_dumpFNM()  : void
Dump Field Info (.fnm) segment file
_dumpTermDictEntry()  : void
Dump Term Dictionary segment file entry.
_generateCFS()  : void
Generate compound index file

Properties

$indexInterval

Expert: The fraction of terms in the "dictionary" which should be stored in RAM. Smaller values use more memory, but make searching slightly faster, while larger values use less memory and make searching slightly slower. Searching is typically not dominated by dictionary lookup, so tweaking this is rarely useful.

public static int $indexInterval = 128

$maxSkipLevels

Expert: The maximum number of skip levels. Smaller values result in slightly smaller indexes, but slower skipping in big posting lists.

public static int $maxSkipLevels = 0

0 indicates that we don't use skip data

Note: not used in current implementation

$skipInterval

Expert: The fraction of TermDocs entries stored in skip tables.

public static int $skipInterval = 0x7fffffff

Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while smaller values result in bigger indexes, less acceleration and more accelerable cases. More detailed experiments would be useful here.

0x7FFFFFFF indicates that we don't use skip data

Note: not used in current implementation

$_fields

Segment fields. Array of Zend_Search_Lucene_Index_FieldInfo objects for this segment

protected array<string|int, mixed> $_fields = array()

$_files

List of the index files.

protected array<string|int, mixed> $_files = array()

Used for automatic compound file generation

$_norms

Normalization factors.

protected array<string|int, mixed> $_norms = array()

An array fieldName => normVector normVector is a binary string. Each byte corresponds to an indexed document in a segment and encodes normalization factor (float value, encoded by \ZendSearch\Lucene\Search\Similarity\AbstractSimilarity::encodeNorm())

Methods

addField()

Add field to the segment

public addField(Field $field) : int

Returns actual field number

Parameters
$field : Field
Return values
int

addStoredFields()

Add stored fields information

public addStoredFields(array<string|int, mixed> $storedFields) : void
Parameters
$storedFields : array<string|int, mixed>

array of \ZendSearch\Lucene\Document\Field objects

addTerm()

Add term

public addTerm(Term $termEntry, array<string|int, mixed> $termDocs) : void

Term positions is an array( docId => array(pos1, pos2, pos3, ...), ... )

Parameters
$termEntry : Term
$termDocs : array<string|int, mixed>

count()

Returns the total number of documents in this segment.

public count() : int
Return values
int

getFieldInfos()

Returns array of FieldInfo objects.

public getFieldInfos() : array<string|int, mixed>
Return values
array<string|int, mixed>

initializeDictionaryFiles()

Create dicrionary, frequency and positions files and write necessary headers

public initializeDictionaryFiles() : void

        
On this page

Search results