| description | LogicalOr Search Criterion |
|---|
The LogicalOr Search Criterion matches content if at least one of the provided Criteria matches.
When querying for products, use LogicalOr instead.
criterion- a set of Criteria combined by the logical operator
$query->filter = new Criterion\LogicalOr([
new Criterion\ContentTypeIdentifier('article'),
new Criterion\SectionIdentifier(['sports', 'news']);
]
);=== "XML"
```xml
<Query>
<Filter>
<OR>
<ContentTypeIdentifierCriterion>article</ContentTypeIdentifierCriterion>
<SectionIdentifierCriterion>news</SectionIdentifierCriterion>
</OR>
</Filter>
</Query>
```
=== "JSON"
```json
{
"Query": {
"Filter": {
"OR": {
"ContentTypeIdentifierCriterion": "article",
"SectionIdentifierCriterion": "news"
}
}
}
}
```