[Bug 24372] New: Elasticsearch - cannot search for titles containing a colon next to a search term using the colon
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@lists.koha-community.org Reporter: nick@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Code has changed : $term =~ s/(:+)(\s+)$lookahead/$2/g; $term =~ s/(\s+)(:+)$lookahead/$1/g; But bug looks still valid. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enable DumpSearchQueryTemplate syspref and look in HTML code to "query_string"
"query"
-- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@helsinki.fi --- Comment #3 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Fridolin Somers from comment #1)
Code has changed : $term =~ s/(:+)(\s+)$lookahead/$2/g; $term =~ s/(\s+)(:+)$lookahead/$1/g;
But bug looks still valid.
This new code should fix this, at least for me this search now works with this new code. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Sarah Cornell <sbcornell@cityofportsmouth.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sbcornell@cityofportsmouth. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Michael Adamyk <madamyk@ckls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |madamyk@ckls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Margaret Hade <margaret@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |margaret@bywatersolutions.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #4 from Christopher Brannon <cbrannon@cdalibrary.org> --- Running into this problem. Would love for this fix to be released. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27597 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- *** This bug has been marked as a duplicate of bug 24567 *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24372 Michael Adamyk <madamyk@ckls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|madamyk@ckls.org | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org