Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple OR filters #14

Merged
merged 2 commits into from
Feb 28, 2024
Merged

Allow multiple OR filters #14

merged 2 commits into from
Feb 28, 2024

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
Collaborator

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
Collaborator

@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
3 checks passed
@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.

2 participants