[Bug 19565] New: Fix regular expression in _truncate_terms so field names are not split up
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19565 Bug ID: 19565 Summary: Fix regular expression in _truncate_terms so field names are not split up 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: glasklas@gmail.com The regular expression used for extraction search terms does not allow for field names containing "." or "-". For example Control-number.raw:"123", would be split up into: "Control-number." and "raw\"123\"". "Control-number:"123" into "Control-", "number:\"123\"". The regular expression needs to be adjusted to allow for certain valid characters ("." and "-" most importantly) in field names. -- 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=19565 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |glasklas@gmail.com |ity.org | -- 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=19565 --- Comment #1 from David Gustafsson <glasklas@gmail.com> --- Created attachment 68893 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68893&action=edit Bug 19565: Fix regular expression in _truncate_terms so field names are not split up The regular expression used for tokenizing search string does not allow for field names containing "." or "-". Fix regular expression to allow for field names containing "." or "-". Test plan: 1. Make sure Elasticsearch is used as default search engine. 2. Select "Search the catalog" in the staff client front page. 3. Search for Control-number.raw="<control number>" where <control number> is an existing control number. (The quotes around are value are needed to prevent Koha from appending "*" to control number). 4. The search should not yield any results. 5. Apply patch. 6. Search again using the same condition. 7. The biblio with the control number used in the search should appear as a match. 8. Search for Control-number="<control number>". 9. The biblio with the control number used in the search should appear as a match. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19565 --- Comment #2 from David Gustafsson <glasklas@gmail.com> --- Just saw this bug was recently reported in: "https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19559", which also contains a test case. Would be nice if "." could also be included as a valid field name character though. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19565 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #3 from David Gustafsson <glasklas@gmail.com> --- *** This bug has been marked as a duplicate of bug 19559 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org