- Classes
LogicalFilter
Version:
| Type | Class |
| Extends | BaseFilter |
| Import path | @sitecore-cloudsdk/search/browser |
A filter with logical conditions. Used for returning search results that match a set of filters or that do not match a certain filter.
For example, return search results that:
- Do not match the filter provided in the condition. For example, return search results where the type is not
"blog". - Match any of the filters provided in the condition. For example, return search results where the type is
"blog"or"pdf". - Match all of the filters provided in the condition. For example, return search results where the type is
"blog"and the publication year is2024.
Constructor
Parameters
| Name | Type | Description |
|---|---|---|
| operator | T | One of the available operators. Operators are used for filtering search results.Must be one of:"not""or""and" |
| value | LogicalFilterValues[T] | Must be of the type corresponding to the operator. |
Methods
toDTO
Maps the LogicalFilter instance to its DTO (data transfer object) format.
Signature
Return value
Returns the LogicalFilter instance in a standardized DTO format.
If you have suggestions for improving this article, let us know!