[Koha-bugs] [Bug 28326] If ElasticSearch enable is not possible to edit or save records with ' ES reserved charset' like []

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 26 17:11:50 CEST 2021


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

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #121035|0                           |1
        is obsolete|                            |

--- Comment #7 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 121436
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121436&action=edit
Bug 28326: Add escape_query function to deal with reserved characters

Bug 26313 introduced a search for analytics, which is great, but it started
sending titles to ES. This, unfortunately, caused problems where the title
contained reserved ES characters.

As these searches should always be literal title searches, we should escape all
the ES
characters before the search.

We should not make this a standard, however, as then it prevents using the
characters for advanced ES
searching, but we still add a function for future reuse

To test:
1 - Have ES setup and running and swtich SearchEngine syspref to
'Elasticsearch'
2 - Edit a record and add some reserved ES characters to the title
   
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
    e.g. De [Crasi] Aristophea.
3 - You get an error on the detail page loading
4 - Apply patch
5 - Reload
6 - The page successfully loads
7 - prove -v t/db_dependent/Koha/SearchEngine/Search.t

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


More information about the Koha-bugs mailing list