Koha-clms/Koha/SearchEngine
Janusz Kaczmarek fc59198172
Bug 37430: (Bug 33407 follow-up) ISBD punctuation removal in ES searches
Tiny adjustment for very special and malicious cases needed in
Koha::SearchEngine::Elasticsearch::QueryBuilder::clean_search_term.

Extended unit tests added following Nick's suggestions in
Bug 33407 discussion.

Test plan
=========
1. Use ktd with Elasticsearch and ktd's test data.
2. Edit the 4th record (The C programming language) and add a semicolon
   followed by a space before the slash in 245 $a to have:
   The C programming language ; /
3. Make a search for the first ISBD zone taken verbatim from the forth
   record:
   The C programming language ; / Brian W. Kernighan, Dennis M. Ritchie

   There should be no result.
4. Apply the patch, restart plack.
5. Repeat the search. You should get the record.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-10-02 10:42:08 +01:00
..
Elasticsearch Bug 37430: (Bug 33407 follow-up) ISBD punctuation removal in ES searches 2024-10-02 10:42:08 +01:00
Zebra Bug 31106: Make clean_search_term escape double quotes 2022-07-18 14:37:35 -03:00
Elasticsearch.pm Bug 35792: Use of uninitialized value $sub6 2024-08-02 19:00:01 +02:00
Indexer.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
QueryBuilder.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Search.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00