-
Notifications
You must be signed in to change notification settings - Fork 0
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
search-api: Index grep with dump rather than calling endpoints #572
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This downloads and extracts a zip of the grep dump to build the `GrepBundle`. This allows us to extract more information about each kode, doesn't really seem that much slower either.
This is replaced by the grep search in search-api. The endpoint will still work for now, but the data will no longer be updated when saving a draft.
To allow us to completely skip calling the udir grep api from the frontend/graphql we need more data! This patch includes everything(?) we need to stop calling the grep api directly from elsewhere.
Since scala-tsi messes up adding the `typename` discriminator we need to hack around it by adding the fields manually to the variants that does not get it 🤷
I broke some tests in the rewrite to fetching grep information via the zipped dump. This patch fixes those.
gunnarvelle
reviewed
Jan 9, 2025
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.
Skulle vi tatt med erstattesAv og gjenbrukAv?
search-api/src/main/scala/no/ndla/searchapi/integration/ZipUtil.scala
Outdated
Show resolved
Hide resolved
search-api/src/main/scala/no/ndla/searchapi/model/api/DescriptionDTO.scala
Outdated
Show resolved
Hide resolved
gunnarvelle
approved these changes
Jan 13, 2025
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.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dette ble mer greier enn planlagt, men dette funker nå! 😄
tilhoerer-laereplan
o.l)typename
i graphql.