[Bug 29561] New: Remove blank facet for languages
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Bug ID: 29561 Summary: Remove blank facet for languages Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com Because the field for language facets is part of a control field, it won't be missing from a record, but it may be blank. When indexing into ES this means we put the field in the document empty When aggregating, ES counts these correctly, but we cannot search for them The display of facets includes a link to the empty values, but it isn't visible -- 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=29561 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=29561 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 127957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127957&action=edit Bug 29561: Remove blank facets This patch strips the blank facets from the ES aggregations, this seems to only affect language fields currently, but could affect any facetable field that can contain blank values To test: 1 - Have Koha running Elasticsearch with standard test data, or add some records with blank values in the 008/35-37 2 - Search for 'a' 3 - Look at the language facets, they should appear normal 4 - Browse to: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=&q=a&sort_by=relevance_dsc&count=20&limit=ln: 5 - Note there is now an 'x' under the Languages facet - to remove a limit you cannot see 6 - Apply patch 7 - Reload 8 - Note the x is not there 9 - Inspect HTML, confirm no blank link under language facets -- 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=29561 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27136 -- 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=29561 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=29561 David Nind <david@davidnind.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=29561 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127957|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 128100 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128100&action=edit Bug 29561: Remove blank facets This patch strips the blank facets from the ES aggregations, this seems to only affect language fields currently, but could affect any facetable field that can contain blank values To test: 1 - Have Koha running Elasticsearch with standard test data, or add some records with blank values in the 008/35-37 2 - Search for 'a' 3 - Look at the language facets, they should appear normal 4 - Browse to: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=&q=a&sort_by=relevance_dsc&count=20&limit=ln: 5 - Note there is now an 'x' under the Languages facet - to remove a limit you cannot see 6 - Apply patch 7 - Reload 8 - Note the x is not there 9 - Inspect HTML, confirm no blank link under language facets Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This removes blank facets release notes| |from search results when | |using Elasticsearch. | |Currently, this only seems | |to affect language fields, | |but could affect any | |facetable field that | |contains blank values. CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Did you try to add a test for this change? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128100|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 129595 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129595&action=edit Bug 29561: Remove blank facets This patch strips the blank facets from the ES aggregations, this seems to only affect language fields currently, but could affect any facetable field that can contain blank values To test: 1 - Have Koha running Elasticsearch with standard test data, or add some records with blank values in the 008/35-37 2 - Search for 'a' 3 - Look at the language facets, they should appear normal 4 - Browse to: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=&q=a&sort_by=relevance_dsc&count=20&limit=ln: 5 - Note there is now an 'x' under the Languages facet - to remove a limit you cannot see 6 - Apply patch 7 - Reload 8 - Note the x is not there 9 - Inspect HTML, confirm no blank link under language facets Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Clear code, reasonable fixme for future reference.. QA scripts happy. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #3)
Did you try to add a test for this change?
Arf we have no unit tests on _convert_facets(). Since this change has a complex context, we should create on in order to avoid regression. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- + next unless $t Also this will remove facet with value zero. This may be odd but we should allow it no ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 140862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140862&action=edit Bug 29561: Unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129595|0 |1 is obsolete| | --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 140863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140863&action=edit Bug 29561: Remove blank facets This patch strips the blank facets from the ES aggregations, this seems to only affect language fields currently, but could affect any facetable field that can contain blank values To test: 1 - Have Koha running Elasticsearch with standard test data, or add some records with blank values in the 008/35-37 2 - Search for 'a' 3 - Look at the language facets, they should appear normal 4 - Browse to: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=&q=a&sort_by=relevance_dsc&count=20&limit=ln: 5 - Note there is now an 'x' under the Languages facet - to remove a limit you cannot see 6 - Apply patch 7 - Reload 8 - Note the x is not there 9 - Inspect HTML, confirm no blank link under language facets Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 140864 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140864&action=edit Bug 29561: (follow-up) Don't remove facet '0' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|martin.renvoize@ptfs-europe |katrin.fischer@bsz-bw.de |.com | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Stealing this QA from Martin ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Turning on displayFacetCount helps to make this more visible. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=29561 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140862|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 141543 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141543&action=edit Bug 29561: Unit test Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140863|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 141544 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141544&action=edit Bug 29561: Remove blank facets This patch strips the blank facets from the ES aggregations, this seems to only affect language fields currently, but could affect any facetable field that can contain blank values To test: 1 - Have Koha running Elasticsearch with standard test data, or add some records with blank values in the 008/35-37 2 - Search for 'a' 3 - Look at the language facets, they should appear normal 4 - Browse to: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=&q=a&sort_by=relevance_dsc&count=20&limit=ln: 5 - Note there is now an 'x' under the Languages facet - to remove a limit you cannot see 6 - Apply patch 7 - Reload 8 - Note the x is not there 9 - Inspect HTML, confirm no blank link under language facets Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140864|0 |1 is obsolete| | --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 141545 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141545&action=edit Bug 29561: (follow-up) Don't remove facet '0' Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31668 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.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=29561 --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 31668 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.08 released in| | Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #18 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Version(s)|22.11.00, 22.05.08 |22.11.00, 22.05.08, released in| |21.11.15 Status|Pushed to stable |Pushed to oldstable --- Comment #19 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11 for 21.11.15 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29561 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #20 from wainuiwitikapark@catalyst.net.nz --- Not backported to 21.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org