Skip to content

Commit

Permalink
Merge pull request #266 from flotiq/feature/23932-overlaps-filter
Browse files Browse the repository at this point in the history
#23932 added docs for overlaps filter
  • Loading branch information
CiotkaCierpienia committed Aug 20, 2024
2 parents 5404337 + b42ae1d commit 64304b7
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions docs/API/content-type/listing-co.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ Filters can accept the following filter types:
- inRange
- empty
- notEmpty
- overlaps

You can check the example for each filter usage below:

Expand Down Expand Up @@ -943,6 +944,86 @@ You can check the example for each filter usage below:
}
```
{ data-search-exclude }

=== "overlaps"
Returns all objects whose Object parameter has an overlap with the filter.

Example:

`filters={"gelery[*].dataUrl":{"type":"overlaps","filter":["/api/v1/content/_media/_media-4a8d1dea-bcb4-4862-a2b8-53ff3d13ce6d","/api/v1/content/_media/_media-ca82f862-75f4-4e3d-a504-d0db7d05b1ba"]}}`

Will return:

```
[
{
"id":"1-id"
"gelery":[
{
"type": "internal",
"dataUrl":"/api/v1/content/_media/_media-4a8d1dea-bcb4-4862-a2b8-53ff3d13ce6d"
},
{
"type": "internal",
"dataUrl":"/api/v1/content/_media/_media-ca82f862-75f4-4e3d-a504-d0db7d05b1ba"
},
{
"type": "internal",
"dataUrl":"/api/v1/content/_media/_media-ca82f862-75f4-4e3d-a504-f0ebff3bacd1"
},
]
},
{
"id":"2-id"
"gelery":[
{
"type": "internal",
"dataUrl":"/api/v1/content/_media/_media-4a8d1dea-bcb4-4862-a2b8-53ff3d13ce6d"
},
{
"type": "internal",
"dataUrl":"/api/v1/content/_media/_media-ca82f862-75f4-4dd2-a504-d0db7d05b1ba"
},
]
},
{
"id":"3-id"
"gelery":[
{
"type": "internal",
"dataUrl":"/api/v1/content/_media/_media-4a8d1dea-bcb4-4862-a2b8-53ff3d13ce6d"
},
{
"type": "internal",
"dataUrl":"/api/v1/content/_media/_media-ca82f862-75f4-4e3d-a504-d0db7d05b1ba"
},
{
"type": "internal",
"dataUrl":"/api/v1/content/_media/_media-ca82f862-75f4-4ffd-a504-cc0dff3bacd1"
},
]
},
]
```
{ data-search-exclude }

Will not return:
```
[
{
"id":"4-id"
"gelery":[
{
"type": "internal",
"dataUrl":"/api/v1/content/_media/_media-ca82f862-75f4-4e3d-a504-f0ebff3bacd1"
},
]
},
]
```
{ data-search-exclude }

!!! Note
The equals and notEquals filters allow passing multiple elements so that the results are equal to any of them, for example:<br>
Expand Down

0 comments on commit 64304b7

Please sign in to comment.