Skip to content
Snippets Groups Projects
Commit be95e508 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- bugfix, missed string evaluation in --descriptive

- bugfix, missed string evaluation in --source
- added exact match
- rosetta expects "+" as sign to combine subqueries via logical and
parent 0f1d0026
No related branches found
No related tags found
No related merge requests found
...@@ -34,8 +34,8 @@ sub opt_spec { ...@@ -34,8 +34,8 @@ sub opt_spec {
["creationdate|c=s" => "search based on creationdate string"], ["creationdate|c=s" => "search based on creationdate string"],
["modificationdate|m=s" => "search based on modificationdate string"] ["modificationdate|m=s" => "search based on modificationdate string"]
] } ], ] } ],
["descriptive|d" => "count based on string search in descriptive metadata"], ["descriptive|d=s" => "count based on string search in descriptive metadata"],
["source|s" => "count based on string search in source metadata"], ["source|s=s" => "count based on string search in source metadata"],
["ie|i=s" => "search a specific IE"], ["ie|i=s" => "search a specific IE"],
["format" => hidden => {one_of => [ ["format" => hidden => {one_of => [
["with-format=s" => "with pronom format id"], ["with-format=s" => "with pronom format id"],
...@@ -80,7 +80,7 @@ sub execute { ...@@ -80,7 +80,7 @@ sub execute {
push @queries, "FILE.objectCharacteristics.modificationDate==$opt->{modificationdate}"; push @queries, "FILE.objectCharacteristics.modificationDate==$opt->{modificationdate}";
} }
if (exists $opt->{'with_format'}) { if (exists $opt->{'with_format'}) {
push @queries, "FILE.generalFileCharacteristics.formatLibraryId=$opt->{'with_format'}"; push @queries, "FILE.generalFileCharacteristics.formatLibraryId==$opt->{'with_format'}";
} }
# unsupported by Rosetta <= 7.0 # unsupported by Rosetta <= 7.0
#if (exists $opt->{'without_format'}) { #if (exists $opt->{'without_format'}) {
...@@ -103,7 +103,8 @@ sub execute { ...@@ -103,7 +103,8 @@ sub execute {
} }
my $query = join(" and ", @queries); #my $query = join(" and ", @queries);
my $query = join("+", @queries);
if (exists $opt->{debug}) { if (exists $opt->{debug}) {
use Data::Printer; use Data::Printer;
p( $opt); p( $opt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment