Summary: | Elasticsearch 5.X - empty subfields cause error on suggestible fields | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Searching - Elasticsearch | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | aleisha, jonathan.druart, lucas, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00, 20.05.05
|
|
Circulation function: | |||
Attachments: |
Bug 25957: Unit test
Bug 25957: Don't push blank field values to ES document Bug 25957: Unit test Bug 25957: Don't push blank field values to ES document Bug 25957: Unit test Bug 25957: Don't push blank field values to ES document Bug 25957: Unit test Bug 25957: Don't push blank field values to ES document |
Description
Nick Clemens (kidclamp)
2020-07-08 17:29:26 UTC
Created attachment 106660 [details] [review] Bug 25957: Unit test Created attachment 106661 [details] [review] Bug 25957: Don't push blank field values to ES document To test: 1 - Load the sample DB or edit a record (using advanced cataloging editor) to have a blank subfield in a field that is indexed as suggestible 2 - For example 'author' / 100a 100 _ _ ‡a 3 - Index that record into Elasticsearch 5.X: perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 4 - Note error 'value must have length > 0' 5 - Edit mappings to set author 100a not suggestible 6 - perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 7 - Success 8 - Set field to suggestible again 9 - Apply patch 10 - perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 11 - Success! Created attachment 110877 [details] [review] Bug 25957: Unit test Created attachment 110878 [details] [review] Bug 25957: Don't push blank field values to ES document To test: 1 - Load the sample DB or edit a record (using advanced cataloging editor) to have a blank subfield in a field that is indexed as suggestible 2 - For example 'author' / 100a 100 _ _ ‡a 3 - Index that record into Elasticsearch 5.X: perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 4 - Note error 'value must have length > 0' 5 - Edit mappings to set author 100a not suggestible 6 - perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 7 - Success 8 - Set field to suggestible again 9 - Apply patch 10 - perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 11 - Success! Created attachment 110880 [details] [review] Bug 25957: Unit test Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Created attachment 110881 [details] [review] Bug 25957: Don't push blank field values to ES document To test: 1 - Load the sample DB or edit a record (using advanced cataloging editor) to have a blank subfield in a field that is indexed as suggestible 2 - For example 'author' / 100a 100 _ _ ‡a 3 - Index that record into Elasticsearch 5.X: perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 4 - Note error 'value must have length > 0' 5 - Edit mappings to set author 100a not suggestible 6 - perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 7 - Success 8 - Set field to suggestible again 9 - Apply patch 10 - perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 11 - Success! Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Created attachment 111240 [details] [review] Bug 25957: Unit test Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 111241 [details] [review] Bug 25957: Don't push blank field values to ES document To test: 1 - Load the sample DB or edit a record (using advanced cataloging editor) to have a blank subfield in a field that is indexed as suggestible 2 - For example 'author' / 100a 100 _ _ ‡a 3 - Index that record into Elasticsearch 5.X: perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 4 - Note error 'value must have length > 0' 5 - Edit mappings to set author 100a not suggestible 6 - perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 7 - Success 8 - Set field to suggestible again 9 - Apply patch 10 - perl misc/search_tools/rebuild_elasticsearch.pl -v -bn 115 -b -d 11 - Success! Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Works as expected, no regressions found. Passing QA Pushed to master for 20.11, thanks to everybody involved! backported to 20.05.x for 20.05.05 doesn't apply cleanly to 19.11.x, please rebase if needed |