[Koha-bugs] [Bug 28884] ElasticSearch: Question mark in title search returns no results

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 18 09:02:32 CEST 2023


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

--- Comment #9 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
(In reply to Janusz Kaczmarek from comment #8)
> (In reply to Nick Clemens from comment #7)
> > This was "solved" with a hack on bug 31213
> > 
> > If I understand what this patch is doing, you are escaping the question mark
> > so it no longer operates as a special character?
> > 
> > This is not a bad idea, however, it needs to be documented with a comment in
> > the code, as well as in the system preference. I think it would actually be
> > better as its own system preference.
> 
> Nick, I'm aware of your 'hack'--now, I'm unable to verify if quickly, but as
> far as I remember it didn't solve this case.  If it did, there would be no
> point for me to dig into this.
> 
> If I remember well, the patch intends to treat the question mark, in the
> function _query_regex_escape_process, in exactly the same way as it is done
> with slash: instead of escaping/unescaping only '/': (?=/) it escapes also
> '?': (?=[/\?]).  Maybe I could extend the existing comment, but I don't feel
> like this is a candidate for a new syspref...?

I think it would be nice if we could keep the truncation feature without
requiring to escape it. It's easy to explain to people to use ?, but much
harder to explain \? - also quite a change in behavior at this point maybe?

I was wondering, if ? replaces one or more characters... why does it not work
as a wild card if there really is a question mark?

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


More information about the Koha-bugs mailing list