[Bug 26533] New: Searching authorities using 'is exactly' doesn't work as expected
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 Bug ID: 26533 Summary: Searching authorities using 'is exactly' doesn't work as expected Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: aleisha@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org When searching authorities using the 'is exactly' limiter, it's expected that the search term needs to match the authority heading EXACTLY. However, it appears to match on any word in the authority heading. For example, I have an authority called 'Atlantic salmon fishing Ireland'. I am able to get search results for this authority when searching 'is exactly' 'atlantic'. But obviously, the heading is not exactly atlantic. So I shouldn't get results from this. -- 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=26533 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- 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=26533 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Code tries to perform "all of subfield field must match" : https://git.koha-community.org/Koha-community/Koha/src/commit/be9f64b638335c... Zebra doc indicates 6=3 is implemented : https://software.indexdata.com/zebra/doc/querymodel-rpn.html#querymodel-bib1... But looks like it does not work with actual Zebra version. Maybe it was implemented in GRS-1 mode. -- 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=26533 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |aleisha@catalyst.net.nz |ity.org | Status|NEW |ASSIGNED -- 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=26533 --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- Ohhh but its is worse than that. In Template, authorities search "is exactly" uses operator "is" : https://git.koha-community.org/Koha-community/Koha/src/commit/0381d9e52407fa... Operator "is" searches "Phrase, No truncation" : https://git.koha-community.org/Koha-community/Koha/src/commit/0381d9e52407fa... Is this a bug ? Looks like "exact" operator is used by C4::Heading. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #3 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 118255 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118255&action=edit Bug 26533: Fix 'is exactly' search for authorities The exact search 6=3 is implemented, but it isn't used as expected when you select 'is exactly' from the authorities search dropdown. This patch remedies that. To test: 1) Ensure you have an authority with more than one word in the name, i.e. Electric power production 2) Go to Authorities in the staff client. 3) Change the dropdown to 'is exactly' and search for one of the words in your record's title, i.e. 'power' in the 'main heading' search 4) Confirm your authority shows in the results, even though it is not an exact match. 5) Search for a biblio record and go to edit the record. 6) Go to Tab 6 and click the plugin button next to one of the 6xx$a fields to trigger the authority finder plugin 7) Repeat Step 3 and Step 4 8) Go to the OPAC and go to Authority Search 9) Repeat Step 3 and Step 4 Apply patch 10) Repeat Steps 1 to 9, confirm that this time the record does NOT show in search results. 11) Repeat Steps 1 to 9 but this time search for the authority record's full title, i.e. 'Electric power production'. Confirm the record does show in the search results because the search term now matches title exactly. Sponsored-by: Education Services Australia SCIS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Aleisha, is this using ICU or CHR? I know Katrin and I were talking about this sort of things recently. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- Bug 27299 for ICU but if it's CHR then nevermind. I'll make a note to come back to this too.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #6 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to David Cook from comment #4)
Aleisha, is this using ICU or CHR?
I know Katrin and I were talking about this sort of things recently.
This is using ICU -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- (In reply to Aleisha Amohia from comment #6)
(In reply to David Cook from comment #4)
Aleisha, is this using ICU or CHR?
I know Katrin and I were talking about this sort of things recently.
This is using ICU
That would be good to include in the test plan, although I think the problem probably exists for both CHR and ICU. Regarding Bug 27299, it has been in master for a little while, so probably not relevant here. I'm looking at C4::AuthoritiesMarc and I'm loving how the comments for 'is' and 'exactly' are the same, but clearly they're not the same, since 'is' uses the 'w' register and 'exactly' uses the 'p' register. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #8 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to David Cook from comment #7)
(In reply to Aleisha Amohia from comment #6)
(In reply to David Cook from comment #4)
Aleisha, is this using ICU or CHR?
I know Katrin and I were talking about this sort of things recently.
This is using ICU
That would be good to include in the test plan, although I think the problem probably exists for both CHR and ICU.
Yes I am pretty sure it does
Regarding Bug 27299, it has been in master for a little while, so probably not relevant here.
We had the patch from Bug 27299 applied and it didn't seem to solve the problem for us
I'm looking at C4::AuthoritiesMarc and I'm loving how the comments for 'is' and 'exactly' are the same, but clearly they're not the same, since 'is' uses the 'w' register and 'exactly' uses the 'p' register.
Yes a little strange! Hopefully this switch to using the 'exact' operator means we're doing the right search now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Aleisha Amohia from comment #8)
Regarding Bug 27299, it has been in master for a little while, so probably not relevant here.
We had the patch from Bug 27299 applied and it didn't seem to solve the problem for us
Yeah it wouldn't help with 'is' but would help with 'exact'.
I'm looking at C4::AuthoritiesMarc and I'm loving how the comments for 'is' and 'exactly' are the same, but clearly they're not the same, since 'is' uses the 'w' register and 'exactly' uses the 'p' register.
Yes a little strange! Hopefully this switch to using the 'exact' operator means we're doing the right search now.
Yeah, I think your patch is good. I'll spin up a KTD to test it in a minute. I should be doing other things but search issues always tickle me. I wonder if we should actually get rid of the 'is' operator all together. Not that you'd need to do that now, but I figure if we have eyes on it now it might be good to think about. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #9)
I wonder if we should actually get rid of the 'is' operator all together. Not that you'd need to do that now, but I figure if we have eyes on it now it might be good to think about.
Grepping around for 'is' and I see C4/Heading.pm, C4/AuthoritiesMarc.pm, cataloguing/value_builder/unimarc_field_225a.pl, Koha/SearchEngine/Elasticsearch/QueryBuilder.pm, t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t... Grepping for "is" finds the following: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_686a.tt koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_686a.tt koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_686a.tt So we can't get rid of 'is' as it looks like those UNIMARC plugins are using it at least -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #11 from David Cook <dcook@prosentient.com.au> --- My test plan: 0) Start koha-testing-docker 1) Determine "Advanced language series." as suitable authority for testing 2) Go to Authorities in staff client 3) Change dropdown to "is exactly" and search "language" 4) Confirm "Advanced language series." is the first hit 5) Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=37 6) Go to field 830 and click the Tag Editor 7) Repeat steps 3 and 4 8) Go to http://localhost:8080/cgi-bin/koha/opac-authorities-home.pl 9) Repeat steps 3 and 4 Apply patch and run koha-plack --restart kohadev 10) Repeat steps 1-9 but confirm that this time the record does not show in the search results 11) Repeat steps 1-9 but this time search for Advanced language series. -- Note that I did get 2 hits for step 10 for the OPAC's Authority search, because it's searching through the whole record and there are some general subdivisions that are exactly Language. A bit unexpected but reasonable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 David Cook <dcook@prosentient.com.au> 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=26533 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118255|0 |1 is obsolete| | --- Comment #12 from David Cook <dcook@prosentient.com.au> --- Created attachment 118257 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118257&action=edit Bug 26533: Fix 'is exactly' search for authorities The exact search 6=3 is implemented, but it isn't used as expected when you select 'is exactly' from the authorities search dropdown. This patch remedies that. To test: 1) Ensure you have an authority with more than one word in the name, i.e. Electric power production 2) Go to Authorities in the staff client. 3) Change the dropdown to 'is exactly' and search for one of the words in your record's title, i.e. 'power' in the 'main heading' search 4) Confirm your authority shows in the results, even though it is not an exact match. 5) Search for a biblio record and go to edit the record. 6) Go to Tab 6 and click the plugin button next to one of the 6xx$a fields to trigger the authority finder plugin 7) Repeat Step 3 and Step 4 8) Go to the OPAC and go to Authority Search 9) Repeat Step 3 and Step 4 Apply patch 10) Repeat Steps 1 to 9, confirm that this time the record does NOT show in search results. 11) Repeat Steps 1 to 9 but this time search for the authority record's full title, i.e. 'Electric power production'. Confirm the record does show in the search results because the search term now matches title exactly. Sponsored-by: Education Services Australia SCIS Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 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=26533 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118257|0 |1 is obsolete| | --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 119929 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119929&action=edit Bug 26533: Fix 'is exactly' search for authorities The exact search 6=3 is implemented, but it isn't used as expected when you select 'is exactly' from the authorities search dropdown. This patch remedies that. To test: 1) Ensure you have an authority with more than one word in the name, i.e. Electric power production 2) Go to Authorities in the staff client. 3) Change the dropdown to 'is exactly' and search for one of the words in your record's title, i.e. 'power' in the 'main heading' search 4) Confirm your authority shows in the results, even though it is not an exact match. 5) Search for a biblio record and go to edit the record. 6) Go to Tab 6 and click the plugin button next to one of the 6xx$a fields to trigger the authority finder plugin 7) Repeat Step 3 and Step 4 8) Go to the OPAC and go to Authority Search 9) Repeat Step 3 and Step 4 Apply patch 10) Repeat Steps 1 to 9, confirm that this time the record does NOT show in search results. 11) Repeat Steps 1 to 9 but this time search for the authority record's full title, i.e. 'Electric power production'. Confirm the record does show in the search results because the search term now matches title exactly. Sponsored-by: Education Services Australia SCIS Signed-off-by: David Cook <dcook@prosentient.com.au> 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=26533 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28182 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28182 [Bug 28182] Elastic search exact authorities search includes punctuation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.06 released in| | Status|Pushed to master |Pushed to stable --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |Searching authorities using release notes| |'is exactly' was matching | |on any word in the heading. | |Now it is matching the | |heading exactly (the entire | |heading). --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- This is a behavior change on a very used feature. I suggest we do not backport on older versions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.05.00,20.11.06 |21.05.00,20.11.06,20.05.12 released in| | CC| |andrew@bywatersolutions.com --- Comment #17 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net --- Comment #18 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28475 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28475 [Bug 28475] Searching all headings returns no results -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #19 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Hi, I just tried the test plan to see if bug 28475 broke this. I'm failing step 4) even though I'm on master :o On sample data I'm searching "AGENTES INTERESADOS" with "is exactly" in the main heading and I get two results. When I'm searching "INTERESADOS" which "is exactly" in the main heading and I don't get a result. (main heading: default) Is there something missing? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26533 --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Victor Grousset/tuxayo from comment #19)
Hi, I just tried the test plan to see if bug 28475 broke this.
I'm failing step 4) even though I'm on master :o
On sample data I'm searching "AGENTES INTERESADOS" with "is exactly" in the main heading and I get two results. When I'm searching "INTERESADOS" which "is exactly" in the main heading and I don't get a result. (main heading: default)
Is there something missing?
You should not get a result with INTERESADOS, as that's not the full heading. Exact means full heading, no more words before or after. (exact field content) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org