[Koha-bugs] [Bug 27597] New: Searching "kw:term" does not work with Elasticsearch
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Feb 2 16:55:12 CET 2021
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 at lists.koha-community.org
Reporter: fridolin.somers at 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.
More information about the Koha-bugs
mailing list