HumHub Documentation (unofficial)

Field
in package

A field is a section of a Document. Each field has two parts, a name and a value. Values may be free text or they may be atomic keywords, which are not further processed. Such keywords may be used to represent dates, urls, etc. Fields are optionally stored in the index, so that they may be returned with hits on the document.

Tags
category

Zend

subpackage

Document

Table of Contents

Properties

$boost  : float
Field boost factor It's not stored directly in the index, but affects on normalization factor
$encoding  : string
Field value encoding.
$isBinary  : bool
Field is stored as binary.
$isIndexed  : bool
Field is to be indexed, so that it may be searched on.
$isStored  : bool
Field is to be stored in the index for return with search hits.
$isTokenized  : bool
Field should be tokenized as text prior to indexing.
$name  : string
Field name
$storeTermVector  : bool
Field are stored as a term vector
$value  : bool
Field value

Methods

__construct()  : mixed
Object constructor
binary()  : Field
Constructs a Binary String valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.
getUtf8Value()  : string
Get field value in UTF-8 encoding
keyword()  : Field
Constructs a String-valued Field that is not tokenized, but is indexed and stored. Useful for non-text fields, e.g. date or url.
text()  : Field
Constructs a String-valued Field that is tokenized and indexed, and is stored in the index, for return with hits. Useful for short text fields, like "title" or "subject". Term vector will not be stored for this field.
unIndexed()  : Field
Constructs a String-valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.
unStored()  : Field
Constructs a String-valued Field that is tokenized and indexed, but that is not stored in the index.

Properties

$boost

Field boost factor It's not stored directly in the index, but affects on normalization factor

public float $boost = 1.0

$encoding

Field value encoding.

public string $encoding

$isBinary

Field is stored as binary.

public bool $isBinary = false

$isIndexed

Field is to be indexed, so that it may be searched on.

public bool $isIndexed = true

$isStored

Field is to be stored in the index for return with search hits.

public bool $isStored = false

$isTokenized

Field should be tokenized as text prior to indexing.

public bool $isTokenized = true

$name

Field name

public string $name

$storeTermVector

Field are stored as a term vector

public bool $storeTermVector = false

$value

Field value

public bool $value

Methods

__construct()

Object constructor

public __construct(string $name, string $value, string $encoding, bool $isStored, bool $isIndexed, bool $isTokenized[, bool $isBinary = false ]) : mixed
Parameters
$name : string
$value : string
$encoding : string
$isStored : bool
$isIndexed : bool
$isTokenized : bool
$isBinary : bool = false

binary()

Constructs a Binary String valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.

public static binary(string $name, string $value) : Field
Parameters
$name : string
$value : string
Return values
Field

getUtf8Value()

Get field value in UTF-8 encoding

public getUtf8Value() : string
Return values
string

keyword()

Constructs a String-valued Field that is not tokenized, but is indexed and stored. Useful for non-text fields, e.g. date or url.

public static keyword(string $name, string $value[, string $encoding = 'UTF-8' ]) : Field
Parameters
$name : string
$value : string
$encoding : string = 'UTF-8'
Return values
Field

text()

Constructs a String-valued Field that is tokenized and indexed, and is stored in the index, for return with hits. Useful for short text fields, like "title" or "subject". Term vector will not be stored for this field.

public static text(string $name, string $value[, string $encoding = 'UTF-8' ]) : Field
Parameters
$name : string
$value : string
$encoding : string = 'UTF-8'
Return values
Field

unIndexed()

Constructs a String-valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.

public static unIndexed(string $name, string $value[, string $encoding = 'UTF-8' ]) : Field
Parameters
$name : string
$value : string
$encoding : string = 'UTF-8'
Return values
Field

unStored()

Constructs a String-valued Field that is tokenized and indexed, but that is not stored in the index.

public static unStored(string $name, string $value[, string $encoding = 'UTF-8' ]) : Field
Parameters
$name : string
$value : string
$encoding : string = 'UTF-8'
Return values
Field

        
On this page

Search results