https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27597 Bug ID: 27597 Summary: Searching "kw:term" does not work with Elasticsearch Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com In Koha/SearchEngine/Elasticsearch/QueryBuilder.pm : There is a map of convertion from CCL : our %index_field_convert = ( 'kw' => '', 'ab' => 'abstract', 'au' => 'author', ... You see that kw is replaced by empty. See that in _convert_index_strings() : my ($conv) = $self->_convert_index_fields($field); unless ( defined($conv) ) { push @res, $s; next; } push @res, ($conv->{field} ? $conv->{field} . ':' : '') . $self->_modify_string_by_type( %$conv, operand => $term ); If Field is empty the character ":" is not added. This behavior is missing from _convert_index_strings_freeform() : $search =~ s/($field_name_pattern)($multi_field_pattern):/(exists $index_field_convert{$1} ? $index_field_convert{$1} : $1)."$2:"/oge; Query "kw:term" will be converted to ":term" :( -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.