UHF-11462: Performance improvements to Linked Events query parameter handling #909
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
UHF-11462
Requests from Linked Events React search components to Linked Events API are currently prone to timeouts, especially when a text search query parameter is included. It was suggested in the ticket that using a keyword instead would make the request more performant.
This PR attempts to do just that.Background investigation and performance testing
text
-parameter use the wordtyollisuus
ortyöllisyys
(identical in terms of results). They will then all benefit from converting the text based search into a keyword based.What was done
Adds a text parameter handler where certain text searches can be converted into keyword parameters instead of using the less performant. This was removed after discussing with Aleksi. Better to use this enhancement manually for now (by adding the keyword parameter manually) which makes it a conscious decision between a slightly different result set and performance.all_ongoing_AND
-parameter, which is still the default fot texts other thantyollisuus
ortyöllisyys
keyword
query parameter to allow filtering with known keywords (even though such filtering isn't available in https://tapahtumat.hel.fi/). Also makes sure keywords can be set from different parameters without them overriding each other.How to install
See install steps in City-of-Helsinki/drupal-hdbt#1196
How to test
https://tapahtumat.hel.fi/fi/haku?start=2025-01-31&categories=movie&keyword=yso:p6357
and Saveapi.hel.fi/linkedevents/v1
(reload if needed to get it there)keyword
-parameter (one manual and one set by thecategories
-handling)Continuous documentation
Other PRs