@@ -, +, @@ - in search field configuration -> search field - add the search field "uri" at the bottom of the tab - you should have two fields "uri" like that : https://snag.gy/BpxcIq.jpg - try to add the search field uri - this time an alert should appear with the message : --- .../admin/searchengine/elasticsearch/mappings.tt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) --- 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 @@ -81,11 +81,19 @@ var table = $(this).closest('table'); var line = $(this).closest("tr"); var name = $(line).find('input[data-id="search_field_name"]').val(); - var label = $(line).find('input[data-id="search_field_name"]').val(); - if ( name.length > 0 && label.length > 0 ) { - var new_line = clone_line( line ); - new_line.appendTo(table.find('tbody')); - clean_line(line); + let already_exist = 0; + [% FOREACH search_field IN all_search_fields %] + if ("[% search_field.name | html %]" == name){ already_exist = 1; } + [% END %] + if (already_exist) { + alert("SearchField "+ name + " already exist"); + } else { + var label = $(line).find('input[data-id="search_field_name"]').val(); + if ( name.length > 0 && label.length > 0 ) { + var new_line = clone_line( line ); + new_line.appendTo(table.find('tbody')); + clean_line(line); + } } }); }); --