Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Core/Search/Elasticsearch/Content/Common/CriterionVisitor/MatchNone.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Search\Elasticsearch\Content\Common\CriterionVisitor;
8
9 use eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher as Dispatcher;
10 use eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitor;
11 use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
12
16 class MatchNone extends CriterionVisitor
17 {
25 public function canVisit(Criterion $criterion)
26 {
27 return $criterion instanceof Criterion\MatchNone;
28 }
29
39 public function visitFilter(Criterion $criterion, Dispatcher $dispatcher, array $languageFilter)
40 {
41 return [
42 'terms' => [
43 '_id' => [],
44 ],
45 ];
46 }
47
57 public function visitQuery(Criterion $criterion, Dispatcher $dispatcher, array $languageFilter)
58 {
59 return [
60 'terms' => [
61 '_id' => [],
62 'minimum_should_match' => 1,
63 ],
64 ];
65 }
66 }
eZ\Publish\API\Repository\Values\Content\Query\Criterion\MatchNone
A criterion that just matches nothing.
Definition: API/Repository/Values/Content/Query/Criterion/MatchNone.php:18
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion.php:15
eZ\Publish\Core\Search\Elasticsearch\Content\Common\CriterionVisitor\MatchNone\visitQuery
visitQuery(Criterion $criterion, Dispatcher $dispatcher, array $languageFilter)
Map field value to a proper Elasticsearch query representation.
Definition: Core/Search/Elasticsearch/Content/Common/CriterionVisitor/MatchNone.php:57
eZ\Publish\Core\Search\Elasticsearch\Content\Common\CriterionVisitor\MatchNone\visitFilter
visitFilter(Criterion $criterion, Dispatcher $dispatcher, array $languageFilter)
Map field value to a proper Elasticsearch filter representation.
Definition: Core/Search/Elasticsearch/Content/Common/CriterionVisitor/MatchNone.php:39
eZ\Publish\Core\Search\Elasticsearch\Content\Common\CriterionVisitor\MatchNone\canVisit
canVisit(Criterion $criterion)
Check if visitor is applicable to current criterion.
Definition: Core/Search/Elasticsearch/Content/Common/CriterionVisitor/MatchNone.php:25
eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher
Dispatches Criterion objects to a visitor depending on the query context.
Definition: CriterionVisitorDispatcher.php:19
eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitor
Visits the criterion tree into a hash representation of Elasticsearch query/filter AST.
Definition: CriterionVisitor.php:19
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion/Ancestor.php:7
eZ\Publish\Core\Search\Elasticsearch\Content\Common\CriterionVisitor
Definition: Core/Search/Elasticsearch/Content/Common/CriterionVisitor/LogicalAnd.php:7
eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitor
Definition: CriterionVisitor/ContentIdIn.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.