Class

eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitor\Field\FieldRange

class FieldRange extends Field

Visits the Field criterion with range operators (LT, LTE, GT, GTE and BETWEEN).

Methods

__construct(FieldNameResolver $fieldNameResolver)

Create from FieldNameResolver.

from Field
bool canVisit(Criterion $criterion)

Check if visitor is applicable to current criterion.

mixed visitFilter(Criterion $criterion, CriterionVisitorDispatcher $dispatcher, array $languageFilter)

Map field value to a proper Elasticsearch filter representation.

mixed visitQuery(Criterion $criterion, CriterionVisitorDispatcher $dispatcher, array $languageFilter)

Map field value to a proper Elasticsearch query representation.

Details

in Field at line 31
public __construct(FieldNameResolver $fieldNameResolver)

Create from FieldNameResolver.

Parameters

FieldNameResolver $fieldNameResolver

at line 29
public bool canVisit(Criterion $criterion)

Check if visitor is applicable to current criterion.

Parameters

Criterion $criterion

Return Value

bool

at line 94
public mixed visitFilter(Criterion $criterion, CriterionVisitorDispatcher $dispatcher, array $languageFilter)

Map field value to a proper Elasticsearch filter representation.

Parameters

Criterion $criterion
CriterionVisitorDispatcher $dispatcher
array $languageFilter

Return Value

mixed

Exceptions

InvalidArgumentException If no searchable fields are found for the given criterion target.

at line 130
public mixed visitQuery(Criterion $criterion, CriterionVisitorDispatcher $dispatcher, array $languageFilter)

Map field value to a proper Elasticsearch query representation.

Parameters

Criterion $criterion
CriterionVisitorDispatcher $dispatcher
array $languageFilter

Return Value

mixed

Exceptions

InvalidArgumentException If no searchable fields are found for the given criterion target.