Summary: | Fix regular expression in _truncate_terms so field names are not split up | ||
---|---|---|---|
Product: | Koha | Reporter: | David Gustafsson <glasklas> |
Component: | Searching - Elasticsearch | Assignee: | David Gustafsson <glasklas> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | ||
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: | Bug 19565: Fix regular expression in _truncate_terms so field names are not split up |
Description
David Gustafsson
2017-11-02 14:33:52 UTC
Created attachment 68893 [details] [review] 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. 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. |