PHP Класс Elastica\Query\Common

Наследование: extends AbstractQuery
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_field string
$_queryParams array

Открытые методы

Метод Описание
__construct ( string $field, string $query, float $cutoffFrequency )
setAnalyzer ( string $analyzer ) Set the analyzer for this query.
setBoost ( float $boost ) Set the boost for this query.
setCutoffFrequency ( float $frequency ) Set the frequency below which terms will be put in the low frequency group.
setDisableCoord ( boolean $disable = true ) Enable / disable computation of score factor based on the fraction of all query terms contained in the document.
setField ( string $field ) Set the field on which to query.
setHighFrequencyOperator ( string $operator ) Set the logic operator for high frequency terms.
setLowFrequencyOperator ( string $operator ) Set the logic operator for low frequency terms.
setMinimumShouldMatch ( integer | string $minimum ) Set the minimum_should_match parameter.
setQuery ( string $query ) Set the query string for this query.
setQueryParam ( string $key, mixed $value ) Set a parameter in the body of this query.
toArray ( ) : array

Описание методов

__construct() публичный Метод

public __construct ( string $field, string $query, float $cutoffFrequency )
$field string the field on which to query
$query string the query string
$cutoffFrequency float percentage in decimal form (.001 == 0.1%)

setAnalyzer() публичный Метод

Set the analyzer for this query.
public setAnalyzer ( string $analyzer )
$analyzer string

setBoost() публичный Метод

Set the boost for this query.
public setBoost ( float $boost )
$boost float

setCutoffFrequency() публичный Метод

Set the frequency below which terms will be put in the low frequency group.
public setCutoffFrequency ( float $frequency )
$frequency float percentage in decimal form (.001 == 0.1%)

setDisableCoord() публичный Метод

Enable / disable computation of score factor based on the fraction of all query terms contained in the document.
public setDisableCoord ( boolean $disable = true )
$disable boolean disable_coord is false by default

setField() публичный Метод

Set the field on which to query.
public setField ( string $field )
$field string the field on which to query

setHighFrequencyOperator() публичный Метод

Set the logic operator for high frequency terms.
public setHighFrequencyOperator ( string $operator )
$operator string see OPERATOR_* class constants for options

setLowFrequencyOperator() публичный Метод

Set the logic operator for low frequency terms.
public setLowFrequencyOperator ( string $operator )
$operator string see OPERATOR_* class constants for options

setMinimumShouldMatch() публичный Метод

Set the minimum_should_match parameter.
public setMinimumShouldMatch ( integer | string $minimum )
$minimum integer | string minimum number of low frequency terms which must be present

setQuery() публичный Метод

Set the query string for this query.
public setQuery ( string $query )
$query string

setQueryParam() публичный Метод

Set a parameter in the body of this query.
public setQueryParam ( string $key, mixed $value )
$key string parameter key
$value mixed parameter value

toArray() публичный Метод

public toArray ( ) : array
Результат array

Описание свойств

$_field защищенное свойство

protected string $_field
Результат string

$_queryParams защищенное свойство

protected array $_queryParams
Результат array