diff --git a/lib/SLUB/LZA/TA/Command/search.pm b/lib/SLUB/LZA/TA/Command/search.pm index d9ebc91d59cafa347ec75534f5ee27e7b17d8507..46980de18cfc2f1c894ec50a2f83296d7dfc982d 100644 --- a/lib/SLUB/LZA/TA/Command/search.pm +++ b/lib/SLUB/LZA/TA/Command/search.pm @@ -96,9 +96,11 @@ sub opt_spec { [ 'with-ldp-project' => 'also returns AIP ldp-project'], [ 'with-location' => 'also returns AIP location' ], [ 'with-path' => 'also returns AIP path' ], + [ 'with-payload-size' => 'also returns original payload size in Bytes'], + [ 'with-payload-filecount' => 'also returns original payload file count'], [ 'with-result-index' => 'also returns result index' ], [ 'with-score' => 'also returns score of Elastic Search match (higher => better)' ], - [ 'with-size' => 'also returns AIP size' ], + [ 'with-size' => 'also returns AIP size in bytes (sum of all file sizes without inodes used for directories)' ], [ 'with-slubarchiv-archivalvaluedescription|with-archival-value-description' => 'also returns AIP slubarchiv-archivalvaluedescription'], [ 'with-slubarchiv-exporttoarchivedate|with-export2archive-date' => 'also returns AIP slubarchiv-exporttoarchivedate'], [ 'with-slubarchiv-externalid' => 'also returns AIP slubarchiv-externalid'], @@ -162,6 +164,12 @@ sub validate_args { $self->usage_error("--lzaid expects string which is conform to SLUBArchiv internal scheme") unless ($opt->{lzaid} =~ m/^$rx_up:$rx_up:$rx_up:$rx_lw:$rx_lw$/); } + if (exists $opt->{'with_payload_size'}) { + $opt->{'with_payload_oxum'} = 1; + } + if (exists $opt->{'with_payload_filecount'}) { + $opt->{'with_payload_oxum'} = 1; + } return 1; }