Skip to content
For AI agents: the complete documentation index is available at llms.txt; this page is also available as Markdown at index.md.

LogicalOr Criterion

The LogicalOr Search Criterion matches content if at least one of the provided Criteria matches.

When querying for products, use LogicalOr instead.

Arguments

  • criterion - a set of Criteria combined by the logical operator

Example

PHP

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
use Ibexa\Contracts\Core\Repository\Values\Content\Query;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion;

$query = new Query();
$query->filter = new Criterion\LogicalOr(
    [
        new Criterion\ContentTypeIdentifier('article'),
        new Criterion\SectionIdentifier(['sports', 'news']),
    ]
);

REST API

1
2
3
4
5
6
7
8
<Query>
    <Filter>
        <OR>
            <ContentTypeIdentifierCriterion>article</ContentTypeIdentifierCriterion>
            <SectionIdentifierCriterion>news</SectionIdentifierCriterion>
        </OR>
    </Filter>
</Query>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "Query": {
        "Filter": {
            "OR": {
                "ContentTypeIdentifierCriterion": "article",
                "SectionIdentifierCriterion": "news"
            }
        }
    }
}