[Bug 19581] New: Elasticsearch - Catmandu split option adds extra null fields to indexes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Bug ID: 19581 Summary: Elasticsearch - Catmandu split option adds extra null fields to indexes Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching - Elasticsearch Assignee: nick@bywatersolutions.com Reporter: nick@bywatersolutions.com This affects sorting, when encountering a null field the title in question will sort out of place. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68947 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68947&action=edit Bug 19581: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68948 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68948&action=edit Bug 19581: Remove 'split' option from Catmandu fixes for marc This option in combination with append seems to add null entries in the indexes for fields that don't exist. These fields then affect sorting. Removing it solves the issue To test: 1 - Have an ES setup 2 - Catalog and index some records 3 - View a record in ES: curl 'localhost:9200/koha_kohadev_biblios/data/4?pretty=yes' 4 - Note there are 'null' entries in the indexes, save this result for comparison 5 - Apply patch 6 - Reindex, amking sure to delete existing indexes perl misc/search_tools/rebuild_elastic_search.pl -d 7 - View the record again 8 - Note the null entries are removed 9 - Note indices are otherwise intact -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68947|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68949 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68949&action=edit Bug 19581: Unit tests This patch makes a few changes to the tests to take into account the change to indexing. To test: prove t/db_dependent/Koha_Elasticsearch_Indexer.t Should return green -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68948|0 |1 is obsolete| | --- Comment #4 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 69092 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69092&action=edit Bug 19581: Remove 'split' option from Catmandu fixes for marc This option in combination with append seems to add null entries in the indexes for fields that don't exist. These fields then affect sorting. Removing it solves the issue To test: 1 - Have an ES setup 2 - Catalog and index some records 3 - View a record in ES: curl 'localhost:9200/koha_kohadev_biblios/data/4?pretty=yes' 4 - Note there are 'null' entries in the indexes, save this result for comparison 5 - Apply patch 6 - Reindex, amking sure to delete existing indexes perl misc/search_tools/rebuild_elastic_search.pl -d 7 - View the record again 8 - Note the null entries are removed 9 - Note indices are otherwise intact Signed-off-by: David Bourgault <david.bourgault@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68949|0 |1 is obsolete| | --- Comment #5 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 69093 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69093&action=edit Bug 19581: Unit tests This patch makes a few changes to the tests to take into account the change to indexing. To test: prove t/db_dependent/Koha_Elasticsearch_Indexer.t Should return green Signed-off-by: David Bourgault <david.bourgault@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |david.bourgault@inlibro.com --- Comment #6 from David Bourgault <david.bourgault@inlibro.com> --- QA tools green Tests passed Work as described. I could still values being set to null, but only as indicators of 00X fields, which I assume is on purpose. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 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=19581 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- The code looks weird now, as we have my $options = ''; ... $options = '' unless ... So this line is completely useless. Also, the comment above is about the split option which is not used anymore, can you update it please ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 72745 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72745&action=edit Bug 19581: Remove unused comment/variable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72745|0 |1 is obsolete| | --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 72767 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72767&action=edit Bug 19581: Remove unused comment and line -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 72997 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72997&action=edit Bug 19581: (follow-up) Fix handling of new and old arrays for auth compat Stolen from bug 20244 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20244 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ere.maijala@helsinki.fi --- Comment #11 from Ere Maijala <ere.maijala@helsinki.fi> --- I think the join option would be useful (also in bug 20244), like this: $options = "join:' '" unless $marc_field =~ m|_/| || $type eq 'sum'; Otherwise subfields of a single field get split to separate fields in ES. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Ere Maijala from comment #11)
I think the join option would be useful (also in bug 20244), like this:
$options = "join:' '" unless $marc_field =~ m|_/| || $type eq 'sum';
Otherwise subfields of a single field get split to separate fields in ES.
I don't actually see a difference here - I added the line and reindexed and the record appeared the same, I tried changing title from 245a to 245 and 245abc - in all cases I got a single entry in the index - maybe I don't understand the issue? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 --- Comment #13 from Ere Maijala <ere.maijala@helsinki.fi> --- Thanks for checking. I'll try again to verify. It might have been a configuration issue on my end too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69092|0 |1 is obsolete| | --- Comment #14 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 73864 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73864&action=edit Bug 19581: Remove 'split' option from Catmandu fixes for marc This option in combination with append seems to add null entries in the indexes for fields that don't exist. These fields then affect sorting. Removing it solves the issue To test: 1 - Have an ES setup 2 - Catalog and index some records 3 - View a record in ES: curl 'localhost:9200/koha_kohadev_biblios/data/4?pretty=yes' 4 - Note there are 'null' entries in the indexes, save this result for comparison 5 - Apply patch 6 - Reindex, amking sure to delete existing indexes perl misc/search_tools/rebuild_elastic_search.pl -d 7 - View the record again 8 - Note the null entries are removed 9 - Note indices are otherwise intact Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69093|0 |1 is obsolete| | --- Comment #15 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 73865 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73865&action=edit Bug 19581: Unit tests This patch makes a few changes to the tests to take into account the change to indexing. To test: prove t/db_dependent/Koha_Elasticsearch_Indexer.t Should return green Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72767|0 |1 is obsolete| | --- Comment #16 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 73866 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73866&action=edit Bug 19581: Remove unused comment and line Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72997|0 |1 is obsolete| | --- Comment #17 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 73867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73867&action=edit Bug 19581: (follow-up) Fix handling of new and old arrays for auth compat Stolen from bug 20244 Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Julian Maurice <julian.maurice@biblibre.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=19581 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.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=19581 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Lot of failures from t/db_dependent/Koha_Elasticsearch.t: # Failed test at t/db_dependent/Koha_Elasticsearch.t line 153. # got: 'marc_map('110a','author__sort.$append', )' # expected: 'marc_map('110a','author__sort.$append', -split => 1)' # Looks like you failed 23 tests of 49. Please fix ASAP https://jenkins.koha-community.org/job/Koha_Master_D8/425/consoleFull -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 73896 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73896&action=edit Bug 19581: Fix Koha_Elasticsearch.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Ok done, 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=19581 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #22 from Nick Clemens <nick@bywatersolutions.com> --- Pushed to stable for 17.11.06 Awesome work all! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19581 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m --- Comment #23 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Not pushed to 17.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org