-
Notifications
You must be signed in to change notification settings - Fork 0
Filter exhibitions #338
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
Filter exhibitions #338
Conversation
rcantin-w
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://api-dev.wellcomecollection.org/content/v0/events?filterOutExhibitions is returning 640 results (same as without the filter) but https://api-dev.wellcomecollection.org/content/v0/events?filterOutExhibitions=true works - is that expected?
| mocks: { | ||
| elasticClientSearch, | ||
| elasticClientGet, | ||
| }, | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you remember what these changes are about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split the agent and mocks out so I could directly test that the Elasticsearch client is called with the correct parameters, e.g.
content-api/api/test/events.test.ts
Line 77 in 44e8cdd
| expect(mocks.elasticClientSearch).toHaveBeenCalledWith( |
rcantin-w
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple questions; I just want to understand for the test changes, not asking for changes. If the query I flagged is as expected then I think it's good to go!
No, both methods of filtering should still be working, so we can deploy this without breaking the current filtering on wellcomecollection.org - I'll investigate |
What does this change?
For #331
Makes it possible to filter out events by their format type, e.g. format=!{id} or format=!{id-alias}
How to test
How can we measure success?
We have a more flexible way of filtering by formats that follows the same pattern as the Catalogue API.
Have we considered potential risks?
Nothing really