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

- add ldp filtering

parent 1eaa5832
No related branches found
No related tags found
No related merge requests found
...@@ -51,6 +51,27 @@ sub prepare_aip_query ($opt) { ...@@ -51,6 +51,27 @@ sub prepare_aip_query ($opt) {
} }
} }
} }
if (exists $opt->{only_ldp_saxon}) {
push @must, {
"match_phrase" => {
"transferMetadata.bim:bag-info_dict.bim:LDP-funder.keyword" => 'LDP: Sachsen'
}
}
}
if (exists $opt->{only_ldp}) {
push @must, {
"exists" => {
field => "transferMetadata.bim:bag-info_dict.bim:LDP-funder"
}
}
}
if (exists $opt->{no_ldp}) {
push @must_not, {
"exists" => {
field => "transferMetadata.bim:bag-info_dict.bim:LDP-funder"
}
}
}
if (exists $opt->{descriptive}) { if (exists $opt->{descriptive}) {
#https://opster.com/guides/elasticsearch/search-apis/elasticsearch-match-multi-match-and-match-phrase-queries/#Multi-match-query #https://opster.com/guides/elasticsearch/search-apis/elasticsearch-match-multi-match-and-match-phrase-queries/#Multi-match-query
push @should, { push @should, {
......
...@@ -76,6 +76,12 @@ sub opt_spec { ...@@ -76,6 +76,12 @@ sub opt_spec {
[ 'only-new|only-first-ingest', 'only if AIP is first ingest' ], [ 'only-new|only-first-ingest', 'only if AIP is first ingest' ],
] } ], ] } ],
[ 'workflow|w=s' => 'LZA internal workflow name'], [ 'workflow|w=s' => 'LZA internal workflow name'],
[ 'ldpmode' => hidden => {
one_of => [
[ 'only-ldp-saxon', 'only if AIP is LDP Saxon funded' ],
[ 'only-ldp', 'only if AIP is LDP funded' ],
[ 'no-ldp', 'only if AIP is not LDP funded' ],
] } ],
[], [],
[ 'with-creationdate' => 'also returns AIP creation date' ], [ 'with-creationdate' => 'also returns AIP creation date' ],
[ 'with-external-description' => 'also returns AIP external-description'], [ 'with-external-description' => 'also returns AIP external-description'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment