[Bug 21534] New: ElasticSearch - Dash is considered like a boolean operator
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Bug ID: 21534 Summary: ElasticSearch - Dash is considered like a boolean operator Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: marjorie.barry-vila@collecto.ca Hi, The following search "Pierrette Saints-Anges" gives no results. url is opac-search.pl?q=pierrette+Saints-Anges The search "Pierrette saints anges" works. url is opac-search.pl?q=pierrette+Saints+Anges I think dash (-) in my first search is considered like a boolean operator, right? Has this problem been identified for ElasticSearch? Regards, Marjorie -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |patrick.robitaille@collecto | |.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- I tested this on master and cannot recreate. According to the docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-qu... Hyphen is considered a boolean 'not' operator in testing though it seems to work as long as there is no space -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 --- Comment #2 from Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> --- (In reply to Nick Clemens from comment #1)
I tested this on master and cannot recreate.
According to the docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl- query-string-query.html
Hyphen is considered a boolean 'not' operator
in testing though it seems to work as long as there is no space
Hi Nick, Do you think my bug is a duplicate of https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20334 Regards Marjorie -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- I do (In reply to Marjorie Barry-Vila from comment #2)
(In reply to Nick Clemens from comment #1)
I tested this on master and cannot recreate.
According to the docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl- query-string-query.html
Hyphen is considered a boolean 'not' operator
in testing though it seems to work as long as there is no space
Hi Nick, Do you think my bug is a duplicate of https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20334
Regards Marjorie
I do, if you do too you can mark it as a duplicate -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 --- Comment #4 from Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> --- (In reply to Nick Clemens from comment #1)
I tested this on master and cannot recreate.
According to the docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl- query-string-query.html
Hyphen is considered a boolean 'not' operator
in testing though it seems to work as long as there is no space
Hi Nick, You may not have been able to reproduce the problem on your side because the QueryAutoTruncate system preference was already set to "only if a * is added"? I realized that I was getting results if I changed the system preference for this option. On the other hand, with the preference system on "only if a * is added" if I search : saints-anges* this gives no result (cgi-bin/koha/opac-search.pl?q=saints-anges*) Could you test this point? Regards, Marjorie -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #5 from Fridolin SOMERS <fridolin.somers@biblibre.com> ---
Hyphen is considered a boolean 'not' operator I think it is only with a space before : -new In this case it is an hyphen between 2 works : saints-anges
-- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22997 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 --- Comment #6 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Looks like its same problem as Bug 22997, by default wildcards are not used. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 --- Comment #7 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 90187 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90187&action=edit Bug 21534: Always compute wildcards You get no results when searching with an hyphen + with * in query string (or with preference QueryAutoTruncate) : ie /cgi-bin/koha/opac-search.pl?q=saints-anges* Looks like query-string by default does not compute wildcards, see analyze_wildcard in : https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-qu... Test plan : 1) Use Elasticsearch 2) Create a record with "saints-anges" 3) Search for "saints-anges" => you get results 4) Search for "saints-anges*" => you get results 5) Search for "saints-ang*" => you get results -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90187|0 |1 is obsolete| | --- Comment #8 from Michal Denar <black23@gmail.com> --- Created attachment 90207 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90207&action=edit Bug 21534: Always compute wildcards You get no results when searching with an hyphen + with * in query string (or with preference QueryAutoTruncate) : ie /cgi-bin/koha/opac-search.pl?q=saints-anges* Looks like query-string by default does not compute wildcards, see analyze_wildcard in : https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-qu... Test plan : 1) Use Elasticsearch 2) Create a record with "saints-anges" 3) Search for "saints-anges" => you get results 4) Search for "saints-anges*" => you get results 5) Search for "saints-ang*" => you get results Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 --- Comment #9 from Arthur Bousquet <arthur.bousquet@inlibro.com> --- Created attachment 90247 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90247&action=edit Update release notes for the 19.05.00 release Signed-off-by: Nick Clemens <nick@bywatersolutions.com> https://bugs.koha-community.org/show_bug.cgi?id=11573 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Arthus, same issue as on bug 11573 here, wrong patch attached. Can you please check your git bz command? If the patch is applied, the right command here would be: git bz attach 21534 HEAD For multiple patches (4): git bz attach xxxx HEAD~4.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.bousquet@inlibro.com --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #10)
Hi Arthus, same issue as on bug 11573 here, wrong patch attached. Can you please check your git bz command? If the patch is applied, the right command here would be: git bz attach 21534 HEAD
For multiple patches (4): git bz attach xxxx HEAD~4..
Arthur, not Arthus, sorry! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 --- Comment #12 from Arthur Bousquet <arthur.bousquet@inlibro.com> --- Yes, sorry it really seems like I'm having some trouble with git-bz =/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- No problem, we all started out once. :) Ah, and to obsolete the ones attached falsely you can uncomment their lines in the git bz attach or git bz edit commands. The other option is to do it here: Details > Edit details > check obsolete -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Arthur Bousquet <arthur.bousquet@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90247|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Arthur Bousquet <arthur.bousquet@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90207|0 |1 is obsolete| | --- Comment #14 from Arthur Bousquet <arthur.bousquet@inlibro.com> --- Created attachment 90260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90260&action=edit Bug 21534: Always compute wildcards You get no results when searching with an hyphen + with * in query string (or with preference QueryAutoTruncate) : ie /cgi-bin/koha/opac-search.pl?q=saints-anges* Looks like query-string by default does not compute wildcards, see analyze_wildcard in : https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-qu... Test plan : 1) Use Elasticsearch 2) Create a record with "saints-anges" 3) Search for "saints-anges" => you get results 4) Search for "saints-anges*" => you get results 5) Search for "saints-ang*" => you get results Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Current status: Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ElasticSearch - Dash is |ElasticSearch - Wildcards |considered like a boolean |not being analyzed |operator | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90260|0 |1 is obsolete| | --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 90614 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90614&action=edit Bug 21534: Always compute wildcards You get no results when searching with an hyphen + with * in query string (or with preference QueryAutoTruncate) : ie /cgi-bin/koha/opac-search.pl?q=saints-anges* Looks like query-string by default does not compute wildcards, see analyze_wildcard in : https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-qu... Test plan : 1) Use Elasticsearch 2) Create a record with "saints-anges" 3) Search for "saints-anges" => you get results 4) Search for "saints-anges*" => you get results 5) Search for "saints-ang*" => you get results Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable Version(s)|19.11.00 |19.11.00,19.05.01 released in| | --- Comment #17 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21534 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #18 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 18.11.x for 18.11.09 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org