From aabc213518beb6316fe117417647b968bbb7bb5a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 12 Apr 2016 10:18:36 -0400 Subject: [PATCH] Min/Max ID clarification; --sort-id-desc Replace start-id/end-id arguments with min-id/max-id to avoid any confusion when using descending sort options. Add support for --sort-id-desc to process records in reverse order of record ID. This works better across multiple batches when you don't know what both the min/max ID values are goign to be ahead of time. Signed-off-by: Bill Erickson --- pingest.pl | 52 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/pingest.pl b/pingest.pl index d1bb30f7d..47f630a3b 100755 --- a/pingest.pl +++ b/pingest.pl @@ -33,10 +33,11 @@ my $skip_browse; # Skip the browse reingest. my $skip_attrs; # Skip the record attributes reingest. my $skip_search; # Skip the search reingest. my $skip_facets; # Skip the facets reingest. -my $start_id; # start processing at this bib ID. -my $end_id; # stop processing when this bib ID is reached. +my $min_id; # start processing at this bib ID. +my $max_id; # stop processing when this bib ID is reached. my $max_duration; # max processing duration in seconds my $newest_first; # Process records in descending order of edit_date +my $sort_id_desc; # Sort by record ID descending my $help; # show help text GetOptions( @@ -46,9 +47,10 @@ GetOptions( 'skip-attrs' => \$skip_attrs, 'skip-search' => \$skip_search, 'skip-facets' => \$skip_facets, - 'start-id=i' => \$start_id, - 'end-id=i' => \$end_id, + 'min-id=i' => \$min_id, + 'max-id=i' => \$max_id, 'newest-first' => \$newest_first, + 'sort-id-desc' => \$sort_id_desc, 'max-duration=i' => \$max_duration, 'help' => \$help ); @@ -57,7 +59,7 @@ sub help { print <