HumHub Documentation (unofficial)

Range extends AbstractQuery
in package

Tags
category

Zend

subpackage

Search

Table of Contents

Properties

$_weight  : AbstractWeight
AbstractQuery weight
$_boost  : float
query boost factor
$_field  : string
Search field
$_inclusive  : bool
Inclusive
$_lowerTerm  : Term
Lower term.
$_matches  : array<string|int, mixed>
Matched terms.
$_upperTerm  : Term
Upper term.

Methods

__construct()  : mixed
Zend_Search_Lucene_Search_Query_Range constructor.
__toString()  : string
Print a query
createWeight()  : AbstractWeight
Constructs an appropriate Weight implementation for this query.
execute()  : void
Execute query in context of index reader It also initializes necessary internal structures
getBoost()  : float
Gets the boost for this clause. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by boost. The boost is 1.0 by default.
getField()  : string|null
Get query field name
getLowerTerm()  : Term|null
Get lower term
getQueryTerms()  : array<string|int, mixed>
Return query terms
getUpperTerm()  : Term|null
Get upper term
highlightMatches()  : string
Highlight matches in $inputHTML
htmlFragmentHighlightMatches()  : string
Highlight matches in $inputHTMLFragment and return it (without HTML header and body tag)
isInclusive()  : bool
Get upper term
matchedDocs()  : array<string|int, mixed>
Get document ids likely matching the query
optimize()  : AbstractQuery
Optimize query in the context of specified index
reset()  : void
Reset query, so it can be reused within other queries or with other indeces
rewrite()  : AbstractQuery
Re-write query into primitive queries in the context of specified index
score()  : float
Score specified document
setBoost()  : void
Sets the boost for this query clause to $boost.
_highlightMatches()  : void
Query specific matches highlighting
_initWeight()  : AbstractWeight|null
Constructs an initializes a Weight for a _top-level_query_.

Properties

$_field

Search field

private string $_field

$_inclusive

Inclusive

private bool $_inclusive

$_lowerTerm

Lower term.

private Term $_lowerTerm

$_matches

Matched terms.

private array<string|int, mixed> $_matches = null

Matched terms list. It's filled during the search (rewrite operation) and may be used for search result post-processing

Array of Zend_Search_Lucene_Index_Term objects

$_upperTerm

Upper term.

private Term $_upperTerm

Methods

__construct()

Zend_Search_Lucene_Search_Query_Range constructor.

public __construct(Term|null $lowerTerm, Term|null $upperTerm, bool $inclusive) : mixed
Parameters
$lowerTerm : Term|null
$upperTerm : Term|null
$inclusive : bool
Tags
throws
InvalidArgumentException

__toString()

Print a query

public __toString() : string
Return values
string

getBoost()

Gets the boost for this clause. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by boost. The boost is 1.0 by default.

public getBoost() : float
Return values
float

getField()

Get query field name

public getField() : string|null
Return values
string|null

getLowerTerm()

Get lower term

public getLowerTerm() : Term|null
Return values
Term|null

getQueryTerms()

Return query terms

public getQueryTerms() : array<string|int, mixed>
Tags
throws
RuntimeException
Return values
array<string|int, mixed>

getUpperTerm()

Get upper term

public getUpperTerm() : Term|null
Return values
Term|null

highlightMatches()

Highlight matches in $inputHTML

public highlightMatches(string $inputHTML[, string $defaultEncoding = '' ][, HighlighterInterface|null $highlighter = null ]) : string
Parameters
$inputHTML : string
$defaultEncoding : string = ''

HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag.

$highlighter : HighlighterInterface|null = null
Return values
string

htmlFragmentHighlightMatches()

Highlight matches in $inputHTMLFragment and return it (without HTML header and body tag)

public htmlFragmentHighlightMatches(string $inputHTMLFragment[, string $encoding = 'UTF-8' ][, HighlighterInterface|null $highlighter = null ]) : string
Parameters
$inputHTMLFragment : string
$encoding : string = 'UTF-8'

Input HTML string encoding

$highlighter : HighlighterInterface|null = null
Return values
string

isInclusive()

Get upper term

public isInclusive() : bool
Return values
bool

matchedDocs()

Get document ids likely matching the query

public matchedDocs() : array<string|int, mixed>

It's an array with document ids as keys (performance considerations)

Tags
throws
UnsupportedMethodCallException
Return values
array<string|int, mixed>

reset()

Reset query, so it can be reused within other queries or with other indeces

public reset() : void

setBoost()

Sets the boost for this query clause to $boost.

public setBoost(float $boost) : void
Parameters
$boost : float

_highlightMatches()

Query specific matches highlighting

protected _highlightMatches(HighlighterInterface $highlighter) : void
Parameters
$highlighter : HighlighterInterface

Highlighter object (also contains doc for highlighting)


        
On this page

Search results