[Koha-bugs] [Bug 24372] New: Elasticsearch - cannot search for titles containing a colon next to a search term using the colon
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jan 7 20:30:51 CET 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372
Bug ID: 24372
Summary: Elasticsearch - cannot search for titles containing a
colon next to a search term using the colon
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: nick at bywatersolutions.com
Using an example record in the testing DB, try searching for:
Pictura murală din nordul Moldovei: modificari estetice si restarare = Mural
painting in the north of Moldavia: aesthetic modification and restoration
In ES the search fails. If you look at the query we end up with terms like:
Moldoveimodificari AND Moldaviaaesthetic
This is because of this line in Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
935 # Remove unquoted colons that have whitespace on either side of them
936 $term =~ s/(\:[:\s]+|[:\s]+:)$lookahead//g;
Removing colons with a space on either side, we must be careful to put that
space back:
936 $term =~ s/(\:[:\s]+|[:\s]+:)$lookahead/ /g;
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list