Summary: | ElasticSearch - Wildcards not being analyzed | ||
---|---|---|---|
Product: | Koha | Reporter: | Marjorie Barry-Vila <marjorie.barry-vila> |
Component: | Searching - Elasticsearch | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | arthur.bousquet, black23, fridolin.somers, lucas, nick, patrick.robitaille |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22997 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.11.00,19.05.01
|
|
Circulation function: | |||
Attachments: |
Bug 21534: Always compute wildcards
Bug 21534: Always compute wildcards Update release notes for the 19.05.00 release Bug 21534: Always compute wildcards Bug 21534: Always compute wildcards |
Description
Marjorie Barry-Vila
2018-10-10 12:55:47 UTC
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 |