Skip to content

Conversation

@wp0pw
Copy link
Contributor

@wp0pw wp0pw commented Feb 28, 2024

Add support for multiple OR filters

This now supports full filters - and populates full list of filters with the filters passed in query,
ie. ?filters=a=b OR c=b&filters=b=x OR a=g will result in

filters: [ {"or": { "a=b", "c=b"}},{"or": {"b=x", "a=g"}} ]

AB#9044

@wp0pw wp0pw requested a review from robinbryce February 28, 2024 13:25
@robinbryce
Copy link
Contributor

what does a litteral url look like with the query ? And does it need "\ " escapes to deal with the spacing ?

@wp0pw
Copy link
Contributor Author

wp0pw commented Feb 28, 2024

Yes spaces have to be URL'd so you end up with something like: /archivist/v1/events?filters=attributes.foo=bar%20OR%20trails=bad&filters=trails=XX%20OR%20attributes.xxx=XX

Copy link
Contributor

@robinbryce robinbryce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wp0pw wp0pw merged commit 42763db into main Feb 28, 2024
@wp0pw wp0pw deleted the dev/waldek/9044-multiple-filters branch February 28, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants