[Koha-bugs] [Bug 27153] ElasticSearch should search keywords apostrophe blind

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 31 08:25:22 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27153

--- Comment #16 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to David Cook from comment #15)
> (In reply to Katrin Fischer from comment #7)
> > Could we treat it ' as a space and 'no space' at the same time maybe? 
> Without language-specific analysis, this might be the best way to go...

That's sort of what the POC does, but just for "as apostrophe" "as no space" -
we could add a third field for converting apostrophes to spaces
> 
> (In reply to Nick Clemens from comment #13)
> > Created attachment 139969 [details] [review] [review]
> > Bug 27153: POC
> I'm not very familiar with the Elasticsearch integration, but that POC
> doesn't touch the indexing, does it? 
It does, it adds an extra field, with a punctuation filter to the indexes for
'default' fields - that filter removes all ASCII punctuation characters

> Isn't it just modifying the search?

It then adds that field to the fields being searched in a 'keyword' search 


> If you searched "carries war" but it had been indexed as "carrie s war",
> then you still wouldn't get a hit?
Not with this one, but "carrie's war" or "carries war" would work

The nice thing is, adding an extra index means we can generically search all
versions of the field, but can also target specific ones:
title.punc_removed: carries
title.raw: carrie's

So staff can be specific, while making standard search more friendly

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list