USE 559 - bulk update fulltexts#388
Merged
Merged
Conversation
Why these changes are being introduced: Nearly identical to embeddings, the TIMDEX dataset now contains "fulltexts" which are added to Opensearch documents via bulk updating. How this addresses that need: A new CLI command `bulk-update-fulltexts` is added that is a near 1:1 clone of `bulk-update-embeddings`. It felt premature to look for a way to combine those CLI commands just to DRY things up, given there are some slight differences and the StepFunction may soon get some refactoring which could have bearing here. Instead, a simple, boring clone of the `bulk-update-embeddings` was done, adjusting for fulltexts, and it's working as expected. Side effects of this change: * Ability to update Opensearch documents with fulltexts Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/USE-559
Contributor
|
Ran the code shared above and received the following output: Makes sense! Given you ran it previously. Looks good to me! |
jonavellecuerdo
approved these changes
May 21, 2026
This file contains hidden or 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
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.
NOTE: this PR builds on #387. Will change base on merge of that PR.
Purpose and background context
This PR adds a new CLI command
bulk-update-fulltextsto TIM. This is a near clone of pre-existing CLI commandbulk-update-embeddings.As noted in the ticket and commit, it was decided to accept some code duplication in the name of simplicity at the moment. There may be a way to combine these, something like
bulk-updatewith a TIMDEX "data type" flag to set, but it would require some helper methods and branching as the logic does differ slightly. Given there is some StepFunction refactoring anticipated in coming months, felt more aligned with that work.With this CLI command added, we'll have the ability to add a new block in the TIMDEX StepFunction to update documents with harvested fulltext (first use case, DSpace theses).
How can a reviewer manually see the effects of these changes?
The following will run the
bulk-update-fulltextscommand for a small run ofresearchdatabasesin Dev. Note that the fulltext records are just simulated records for this source, but do exercise the CLI command correctly.1- Set Dev1
TimdexManagercredentials2- Set env vars:
3- Run CLI command:
Should see output:
Includes new or updated dependencies?
NO
Changes expectations for external applications?
YES: unlocks a StepFunction update to add a new fulltext harvesting + indexing section
What are the relevant tickets?
Code review