[Bug 24559] New: Elasticsearch - add support for 'date' fields
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24559 Bug ID: 24559 Summary: Elasticsearch - add support for 'date' fields 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 There is a fixme in the code related to this. For dates like the 260c and 264c we need a way to parse p2014 into 2014 etc. This affects sorting on dates -- 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=24559 AspenCat Team <aspencatteam@clicweb.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aspencatteam@clicweb.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24559 --- Comment #1 from AspenCat Team <aspencatteam@clicweb.org> --- If sort by publication date is not working, it should probably not be an option. It is a nice option so it would be good to have fixed. When results return more records than are easily reviewed it is nice to be able to sort either alphabetical by title (which is also not working) or publication date. -- 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=24559 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=24559 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 99626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99626&action=edit Bug 24559: Add 'year' type to Elasticsearch When indexing fields like 260c or 008_/7-10 we need a way to format these 'date' fields into years. Removing punctuation and coverting unknown values to 0 To test: 1 - Edit some records to have dates of publication in 008 like 202u 2021 203u 2039 2 - Also add to title for all records a unique word like 'octoparrot' 3 - Search for 'octoparrot' 4 - Sort records by publication/copyrightdate 5 - Confirm sorting is not as expected 6 - Apply patch 7 - Set copydate to 'year' type 8 - Reindex 9 - Repeat search 10 - Confirm sorting works as expected -- 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=24559 Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mkstephens@lancasterseminar | |y.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24559 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=24559 --- Comment #3 from Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> --- Nick, I'm getting this error when I try to change copydate to Year: An error occurred when updating mappings: DBIx::Class::Storage::DBI::_dbh_execute(): Data truncated for column 'type' at row 1 at /kohadevbox/koha/Koha/Object.pm line 156 . How do I fix that? (and how on earth did you come up with octoparrot??) -- 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=24559 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 99785 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99785&action=edit Bug 24559: Database update -- 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=24559 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Myka Kennedy Stephens from comment #3)
Nick, I'm getting this error when I try to change copydate to Year: An error occurred when updating mappings: DBIx::Class::Storage::DBI::_dbh_execute(): Data truncated for column 'type' at row 1 at /kohadevbox/koha/Koha/Object.pm line 156 .
How do I fix that? (and how on earth did you come up with octoparrot??)
Hah, you need the update I didn't attach It's a Simpsons joke: https://giphy.com/gifs/season-12-the-simpsons-12x9-3orifddyIN9i0I9tp6 "polly shouldn't be" -- 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=24559 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=24559 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99626|0 |1 is obsolete| | Attachment #99785|0 |1 is obsolete| | --- Comment #6 from Michal Denar <black23@gmail.com> --- Created attachment 99791 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99791&action=edit Bug 24559: Add 'year' type to Elasticsearch When indexing fields like 260c or 008_/7-10 we need a way to format these 'date' fields into years. Removing punctuation and coverting unknown values to 0 To test: 1 - Edit some records to have dates of publication in 008 like 202u 2021 203u 2039 2 - Also add to title for all records a unique word like 'octoparrot' 3 - Search for 'octoparrot' 4 - Sort records by publication/copyrightdate 5 - Confirm sorting is not as expected 6 - Apply patch 7 - Set copydate to 'year' type 8 - Reindex 9 - Repeat search 10 - Confirm sorting works as expected Nice work, Nick. Signed-off-by: Michal Denar <black23@gmail.com> -- 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=24559 --- Comment #7 from Michal Denar <black23@gmail.com> --- Created attachment 99792 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99792&action=edit Bug 24559: Database update Signed-off-by: Michal Denar <black23@gmail.com> -- 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=24559 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=24559 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Elasticsearch - add support |Elasticsearch - add support |for 'date' fields |for 'year' fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24559 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24807 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24559 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- *** Bug 25378 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=24559 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|Signed Off |RESOLVED --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Resolving this in favor of 24807 *** This bug has been marked as a duplicate of bug 24807 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org