Bug 37137

Summary: Elasticsearch and punctuation
Product: Koha Reporter: Kristi <kkrueger>
Component: Searching - ElasticsearchAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: kkrueger, nick
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27153
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Kristi 2024-06-19 20:43:31 UTC
It would be great for those using Elasticsearch if searching the catalog would ignore commas and apostrophes, that is, treat the punctuation as a delete. This is how other search engines and ILS's handle searches. This will help those librarians that do (or do not) include punctuation in the search where it may not (or may) be in the record. 

The hoped for outcome is that searching for "1,000 fun facts" and "1000 fun facts" will retrieve the same results, and similarly "thats not my deer" and "that's not my deer" will retrieve the same results.
Comment 1 Katrin Fischer 2024-06-20 07:10:10 UTC
Hi Kristi, which version of Koha are you testing with? This might have been fixed by bug 27153 already (in 23.11).
Comment 2 Nick Clemens (kidclamp) 2024-07-10 11:17:14 UTC
(In reply to Katrin Fischer from comment #1)
> Hi Kristi, which version of Koha are you testing with? This might have been
> fixed by bug 27153 already (in 23.11).

In that bug we remove the punctuation from the index, this means that a search for "1000" will return titles with "1000" or "1,000"

We don't perform the same substitution on search terms, so a search for "1,000"
will not return titles with "1000"

Libraries would like it to work both ways