@@ -, +, @@ instead of 0/1 --- .../bug_23716_update_sort_mappings.perl | 6 +++++ .../searchengine/elasticsearch/mappings.tt | 22 ++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_23716_update_sort_mappings.perl --- a/installer/data/mysql/atomicupdate/bug_23716_update_sort_mappings.perl +++ a/installer/data/mysql/atomicupdate/bug_23716_update_sort_mappings.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( "UPDATE search_marc_to_field SET sort = 1 WHERE sort IS NULL" ); + $dbh->do( "ALTER TABLE search_marc_to_field MODIFY COLUMN sort tinyint(1) DEFAULT 1 NOT NULL COMMENT 'Sort defaults to 1 (Yes) and creates sort fields in the index, 0 (no) will prevent this'" ); + NewVersion( $DBversion, 27316, "In Elastisearch mappings convert NULL (Undef) for sort to 1 (Yes)"); +} --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt @@ -310,7 +310,11 @@ a.add, a.delete { [% mapping.search_field_label | html %]