Skip to content

Update bulk-index to support bulk-indexing all #122

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nonword
Copy link
Member

@nonword nonword commented Jun 11, 2025

The hasMarc and nyplSource filters are now optional

The hasMarc and nyplSource filters are now optional
@nonword nonword requested a review from charmingduchess June 11, 2025 19:55
@@ -613,7 +623,7 @@ const run = async () => {
if (
argv.bibId ||
argv.itemId ||
(argv.type && argv.hasMarc)
(argv.type)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this leave the script open to an update on all of a given type? I feel like we should encourage a practice of narrowing down slightly the scope... maybe a check like argv.type && (argv.hasMarc || argv.nyplSource)

Copy link
Member Author

Choose a reason for hiding this comment

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

Will implement

@charmingduchess
Copy link
Contributor

One more note - if you only pass in --nyplSource, the error message does not refer to recent changes:

Usage:
Reindex a single record:
  node reindex-record --envfile [path to .env] (--bibId id|--itemId id)
Reindex by has-marc:
  node reindex-record --envfile [path to .env] --type bib --hasMarc 001 [--hasSubfield S]
Reindex by CSV (containing prefixed ids):
  node reindex-record --envfile [path to .env] --csv FILE --csvIdColumn 0
error: Error: Insufficient params

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants