To reproduce: - Set SearchEngine=Zebra - Run: $ kshell k$ prove prove t/db_dependent/Circulation/Returns.t => SUCCESS: Tests pass! - Set SearchEngine=Elasticsearch - Run: k$ prove prove t/db_dependent/Circulation/Returns.t => FAIL: Things explode because '0' is not a valid boolean for Elasticsearch (legacy fallback in past versions).
Maybe: diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index 9c114fb060..c7081ee559 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -308,7 +308,11 @@ sub get_fixer_rules { # boolean gets special handling, basically if it doesn't exist, # it's added and set to false. Otherwise we can't query it. push @rules, - "unless exists('$name') add_field('$name', 0) end"; + "if is_true('$name') + add_field('$name', 'true') + else + add_field('$name', 'false') + end"; } if ($type eq 'sum' ) { push @rules, "sum('$name')";
if accepted, Bug #19893 will fix this.
*** This bug has been marked as a duplicate of bug 19893 ***