Summary: | Analytic search links formed incorrectly | ||
---|---|---|---|
Product: | Koha | Reporter: | Joonas Kylmälä <joonas.kylmala> |
Component: | Cataloging | Assignee: | Joonas Kylmälä <joonas.kylmala> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, kyle, m.de.rooy, nick, tomascohen, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27575 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.11.00,21.05.02,20.11.08
|
|
Circulation function: | |||
Bug Depends on: | 15851 | ||
Bug Blocks: | 28682 | ||
Attachments: |
Bug 28513: Fix analytics search links so they don't match unrelated biblios
Bug 28513: Fix analytics search links so they don't match unrelated biblios Bug 28513: Fix analytics search links so they don't match unrelated biblios |
Description
Joonas Kylmälä
2021-06-04 09:39:52 UTC
Created attachment 121629 [details] [review] Bug 28513: Fix analytics search links so they don't match unrelated biblios At least when using Searchengine=Elasticsearch what happened was that without () parenthese included the search for Host-item field was done only to the first token, the subsequent ones matched any fields. Adding the parentheses restrict the search to Host-item search field only. To test: 1) Set Searchengine = elasticsearch 2) Make a biblio with 245a = "biológica paranaense." and 773a = "Acta" 3) Go to a biblio with 245a = "Acta biológica paranaense" (in kohadevbox or create one if you need). 4) Notice that the "Acta biológica paranaense" biblio's detail page link "Show analytics" takes to the "biológica paranaense" incorrectly just because the 773a has "Acta" and the words "biológica" and "paranaense" appear elsewhere in the biblio. 5) Apply patch and notice the link is now not created at all Created attachment 121635 [details] [review] Bug 28513: Fix analytics search links so they don't match unrelated biblios At least when using Searchengine=Elasticsearch what happened was that without () parenthese included the search for Host-item field was done only to the first token, the subsequent ones matched any fields. Adding the parentheses restrict the search to Host-item search field only. To test: 1) Set Searchengine = elasticsearch 2) Make a biblio with 245a = "biológica paranaense." and 773a = "Acta" 3) Go to a biblio with 245a = "Acta biológica paranaense" (in kohadevbox or create one if you need). 4) Notice that the "Acta biológica paranaense" biblio's detail page link "Show analytics" takes to the "biológica paranaense" incorrectly just because the 773a has "Acta" and the words "biológica" and "paranaense" appear elsewhere in the biblio. 5) Apply patch and notice the link is now not created at all Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Created attachment 121869 [details] [review] Bug 28513: Fix analytics search links so they don't match unrelated biblios At least when using Searchengine=Elasticsearch what happened was that without () parenthese included the search for Host-item field was done only to the first token, the subsequent ones matched any fields. Adding the parentheses restrict the search to Host-item search field only. To test: 1) Set Searchengine = elasticsearch 2) Make a biblio with 245a = "biológica paranaense." and 773a = "Acta" 3) Go to a biblio with 245a = "Acta biológica paranaense" (in kohadevbox or create one if you need). 4) Notice that the "Acta biológica paranaense" biblio's detail page link "Show analytics" takes to the "biológica paranaense" incorrectly just because the 773a has "Acta" and the words "biológica" and "paranaense" appear elsewhere in the biblio. 5) Apply patch and notice the link is now not created at all Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.02 Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. Pushed to 20.11.x for 20.11.08 |