Bug 27431 - ES searches containing words starting with 2 hyphens or only hyphen(s) fail
Summary: ES searches containing words starting with 2 hyphens or only hyphen(s) fail
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Alex Arnaud
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-14 13:05 UTC by Alex Arnaud
Modified: 2021-05-07 14:32 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 27431: Elasticsearch - escape words that equal to hyphen or starting with more than one hyphen (1011 bytes, patch)
2021-01-14 13:16 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 27431: Elasticsearch - escape words that equal to hyphen or starting with more than one hyphen (1.03 KB, patch)
2021-03-19 09:24 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Arnaud 2021-01-14 13:05:25 UTC
On ElasticSearch, query like "(--)", "(-)" or "(--science)" fails.

In authority module (authorities-home.pl or auth-finder.pl), searching a term like "Science -- fiction" produce a query that fail: "(Science) AND (--) AND (fiction)"
Comment 1 Alex Arnaud 2021-01-14 13:16:57 UTC
Created attachment 115156 [details] [review]
Bug 27431: Elasticsearch - escape words that equal to hyphen or starting with more than one hyphen
Comment 2 PTFS Europe Sandboxes 2021-03-19 09:24:52 UTC
Created attachment 118499 [details] [review]
Bug 27431: Elasticsearch - escape words that equal to hyphen or starting with more than one hyphen

Signed-off-by: HUGO AGUD <hagud@orex.es>
Comment 3 Nick Clemens (kidclamp) 2021-05-07 14:32:29 UTC
Can we get a more detailed test plan and some unit tests for this one?

Terms beginning with '-' are treated as negtive terms, i.e. the results shouldn't have them - this doesn't seem to affect that

Is this affecting biblio search as well as auth?