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
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
(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 (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
(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
> 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
Looks like its same problem as Bug 22997, by default wildcards are not used.
Created attachment 90187 [details] [review] 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-query-string-query.html 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
Created attachment 90207 [details] [review] 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-query-string-query.html 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>
Created attachment 90247 [details] [review] 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
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..
(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!
Yes, sorry it really seems like I'm having some trouble with git-bz =/
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
Created attachment 90260 [details] [review] 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-query-string-query.html 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
Created attachment 90614 [details] [review] 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-query-string-query.html 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>
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.01
backported to 18.11.x for 18.11.09