[Bug 26051] New: Elasticsearch field local-classification must be sortable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Bug ID: 26051 Summary: Elasticsearch field local-classification must be sortable 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: fridolin.somers@biblibre.com With Elasticsearch the search field use for sorting by callnumber is "local-classification" (from Koha::SearchEngine::Elasticsearch::QueryBuilder::_convert_sort_fields). So this search field must be sortable in default mappings.yaml. -- 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=26051 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- 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=26051 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.arnaud@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial 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=26051 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 107237 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107237&action=edit Bug 26051: Elasticsearch field local-classification sort=1 in mapping.yaml With Elasticsearch the search field use for sorting by callnumber is "local-classification" (from Koha::SearchEngine::Elasticsearch::QueryBuilder::_convert_sort_fields). So this search field must be sortable in default mappings.yaml. If not you see this error in logs : No mapping found for [local-classification__sort] Test plan : 1) Install Koha with Elasticsearch with mappings.yaml from sources (admin/searchengine/elasticsearch/mappings.yaml) 2) Reset mappings 3) Rebuild indexes 4) Perform a search 5) Check sorting by callnumber is OK -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107237|0 |1 is obsolete| | --- Comment #2 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 114707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114707&action=edit Bug 26051: Elasticsearch field local-classification sort=1 in mapping.yaml With Elasticsearch the search field use for sorting by callnumber is "local-classification" (from Koha::SearchEngine::Elasticsearch::QueryBuilder::_convert_sort_fields). So this search field must be sortable in default mappings.yaml. If not you see this error in logs : No mapping found for [local-classification__sort] Test plan : 1) Install Koha with Elasticsearch with mappings.yaml from sources (admin/searchengine/elasticsearch/mappings.yaml) It should be the case on all developement instalations 2) Reset mappings (Administration › Search engine configuration (Elasticsearch)) 3) Rebuild indexes: misc/search_tools/rebuild_elasticsearch.pl -v -d 4) Perform a search 5) Check sorting by callnumber is OK (add some call numbers if necessary) Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |victor@tuxayo.net --- Comment #3 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Completed a bit the plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 114957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114957&action=edit Bug 26051: [alternate] We should sort callnumber based on cn-sort In zebra we sort by callnumber using 8007 cn-sort We should do the same in elasticsearch To test: 1 - Have Koha using Elasticsearch 2 - Perform a search 3 - Attempt to sort by callnumber 4 - Error in logs: No mapping found for [local-classification__sort] 5 - Apply patch 6 - Restart all 7 - Perform a search and sort by callnumber 8 - Success! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Signed Off |In Discussion --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Victor and Frido, can you look at my alternate patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Anne-Cécile Bories <anne-cecile.bories@iepg.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anne-cecile.bories@iepg.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- I'll do ASAP ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114707|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 115662 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115662&action=edit Bug 26051: Add sort=1 on cn-sort in mappings.yaml -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 115664 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115664&action=edit Bug 26051: We should sort callnumber based on cn-sort In zebra we sort by callnumber using 8007 cn-sort We should do the same in elasticsearch To test: 1 - Have Koha using Elasticsearch 2 - Perform a search 3 - Attempt to sort by callnumber 4 - Error in logs: No mapping found for [local-classification__sort] 5 - Apply patch 6 - Restart all 7 - Perform a search and sort by callnumber 8 - Success! Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114957|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- You patch makes sens :) I've added a patch to define cn-sort sort=1 in mappings.yaml. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bwsdonna@gmail.com --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 26192 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=26051 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Elasticsearch field |Elasticsearch uses the |local-classification must |wrong field for callnumber |be sortable |sorting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Heather <heather_hernandez@nps.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |heather_hernandez@nps.gov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 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=26051 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115662|0 |1 is obsolete| | --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 116086 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116086&action=edit Bug 26051: Add sort=1 on cn-sort in mappings.yaml 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=26051 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115664|0 |1 is obsolete| | --- Comment #12 from David Nind <david@davidnind.com> --- Created attachment 116087 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116087&action=edit Bug 26051: We should sort callnumber based on cn-sort In zebra we sort by callnumber using 8007 cn-sort We should do the same in elasticsearch To test: 1 - Have Koha using Elasticsearch 2 - Perform a search 3 - Attempt to sort by callnumber 4 - Error in logs: No mapping found for [local-classification__sort] 5 - Apply patch 6 - Restart all 7 - Perform a search and sort by callnumber 8 - Success! Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> 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=26051 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #13 from David Nind <david@davidnind.com> --- Testing notes (using koha-testing-docker) - the error message appears in /var/log/koha/kohadev/plack-intranet-error.log - enabling Elasticsearch by changing system preference SearchEngine - package command to reindex: koha-elasticsearch --rebuild -d -b -a -v kohadev - before applying the patch also got "No results found" and "Error: Unable to perform your search. Please try again." when trying to sort in the staff interface (including the advanced search form) and the OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the sorting of release notes| |search results by call | |number when using | |Elasticsearch. Currently it | |does not sort correctly | |(uses local-classification | |instead of cn-sort) and may | |also cause error messages | |"No results found" and | |"Error: Unable to perform | |your search. Please try | |again.". This also matches | |the behaviour used by | |Zebra. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 --- Comment #14 from Ivan Dziuba <ivan.dziuba@inlibro.com> --- Created attachment 116295 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116295&action=edit cam12263 - plugin Pando - Ajout d'un plugin pour intégrer les utilisateurs Koha avec Pando -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 --- Comment #15 from David Nind <david@davidnind.com> --- Hi Ivan. I'm assuming your patch with InLibro's carousel plugin was added in error to this bug? David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Attachment #116295|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #116086|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117165 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117165&action=edit Bug 26051: Add sort=1 on cn-sort in mappings.yaml 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=26051 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #116087|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117166 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117166&action=edit Bug 26051: We should sort callnumber based on cn-sort In zebra we sort by callnumber using 8007 cn-sort We should do the same in elasticsearch To test: 1 - Have Koha using Elasticsearch 2 - Perform a search 3 - Attempt to sort by callnumber 4 - Error in logs: No mapping found for [local-classification__sort] 5 - Apply patch 6 - Restart all 7 - Perform a search and sort by callnumber 8 - Success! Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> 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=26051 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Surprised this one slipped through the net for as long as it has.. Works as expected, no regressions found. Passing QA (I also got rid of that final errant attachment) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.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=26051 --- Comment #19 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=26051 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.04 released in| | --- Comment #20 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.04 |21.05.00,20.11.04,20.05.10 released in| | Status|Pushed to stable |Pushed to oldstable CC| |andrew@bywatersolutions.com --- Comment #21 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #22 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=26051 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29632 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29632 [Bug 29632] Callnumber sorting is incorrect in Elasticsearch -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org