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

- removed 'source' search

- added 'fuzzy' search
parent 7e28b608
No related branches found
No related tags found
No related merge requests found
......@@ -13,9 +13,6 @@ sub prepare_aip_query ($opt) {
if (exists $opt->{maxrecords}) {
$query->{size} = $opt->{maxrecords};
}
if (exists $opt->{source}) {
#push @queries, "IE.sourceMD.content=\"$opt->{source}\"";
}
if (exists $opt->{aip}) {
push @must, {
"match_phrase" => {
......@@ -96,7 +93,16 @@ sub prepare_aip_query ($opt) {
push @should, {
"multi_match" => {
"query" => "$opt->{descriptive}",
"fields" => ["transferMetadata.*"] # scan all metadata
"fields" => ["transferMetadata.*"] # scan all metadata, exact match
}
}
}
if (exists $opt->{fuzzy}) {
push @should, {
"multi_match" => {
"query" => "$opt->{fuzzy}",
"fields" => ["transferMetadata.*"], # scan all metadata, phrase match
"type" => "phrase_prefix",
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment