https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21146

--- Comment #1 from Tomás Cohen Arazi <[email protected]> ---
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')";

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to