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

- fixed opt-keys startrecord and maxrecords

- fixed debug output  (use stderr)
parent cd8696d2
Branches
Tags
No related merge requests found
...@@ -65,11 +65,11 @@ sub prepare_query ($opt) { ...@@ -65,11 +65,11 @@ sub prepare_query ($opt) {
my $query; my $query;
my @must; my @must;
my @should; my @should;
if (exists $opt->{start_record}) { if (exists $opt->{startrecord}) {
$query->{from} = $opt->{start_record} - 1; # start from index 0 -> first record $query->{from} = $opt->{startrecord} - 1; # start from index 0 -> first record
} }
if (exists $opt->{max_records}) { if (exists $opt->{maxrecords}) {
$query->{size} = $opt->{max_records}; $query->{size} = $opt->{maxrecords};
} }
if (exists $opt->{source}) { if (exists $opt->{source}) {
#push @queries, "IE.sourceMD.content=\"$opt->{source}\""; #push @queries, "IE.sourceMD.content=\"$opt->{source}\"";
...@@ -146,9 +146,8 @@ sub prepare_query ($opt) { ...@@ -146,9 +146,8 @@ sub prepare_query ($opt) {
if (exists $opt->{debug}) { if (exists $opt->{debug}) {
use Data::Printer; use Data::Printer;
say "opt=", np( $opt); say STDERR "\@must=",np(@must);
say "\@must=",np(@must); say STDERR "\@should=",np(@should);
say "\@should=",np(@should);
} }
return $query; return $query;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment