Skip to content

Conversation

@gestchild
Copy link
Contributor

@gestchild gestchild commented Dec 23, 2025

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

Copy link
Contributor

@rcantin-w rcantin-w left a comment

Choose a reason for hiding this comment

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

Comment on lines +95 to +99
mocks: {
elasticClientSearch,
elasticClientGet,
},
};
Copy link
Contributor

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?

Copy link
Contributor Author

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.

expect(mocks.elasticClientSearch).toHaveBeenCalledWith(

@rcantin-w rcantin-w moved this from Backlog to Ready for review in Digital experience Jan 5, 2026
Copy link
Contributor

@rcantin-w rcantin-w left a 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!

@gestchild
Copy link
Contributor Author

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?filterOutExhibit

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

@gestchild gestchild merged commit 4833714 into main Jan 5, 2026
5 checks passed
@gestchild gestchild deleted the filterExhibitions branch January 5, 2026 14:39
@gestchild gestchild moved this from Ready for review to Done in Digital experience Jan 6, 2026
@pollecuttn pollecuttn moved this from Done to Archive in Digital experience Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Archive

Development

Successfully merging this pull request may close these issues.

3 participants