Koha-clms/installer/data/mysql
David Gustafsson cbd56aa5fc Bug 24807: [20.05.x] Add "year" type to improve sorting behaviour
Add a "year" search field type. Fields with this type will only
retain values that looks like years, so invalid values such as
whitespace or word characters will not be indexed.
This for instance improves the behaviour when sorting by
"date-of-publication". If all values are indexed, records with
junk data instead of valid years will appear first among the search
results, drowning out more relevant hits. If assigning this field
the "year" type these records will instead always appear last,
regarless of sort order.

To test:

1) Have at least two biblios, one with a valid year in 008 (pos 7-10)
and another with an invalid one ("uuuu" for example)
2) Perform a wildcard search (*) and sort results by publication date.
3) The record with invalid year of pulication in 008 should appear first
4) Apply patch and run database updates
5) Reindex ElasticSearch
6) Perform the same search as in 2)
7) The record with the invalid year should now appear last

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 24807: Add database update script

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 24807: Update tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 24807: Add suppport for uncertain fields and ranges

To test:
1 - Have some records with uncertain dates in the 008
    19uu, 195u, etc.
2 - Index them in Elasticsearch
3 - Do a search that will return them
4 - Sort results by publication/copyright date
5 - Note odd results
6 - Apply patch
7 - Reindex
8 - Sorting should be improved

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 24807: Refactor using tokenize_callbacks

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 24807: Simplify with new and imporved value_callbacks

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 24807: (follow-up) Fix spelling

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 24807: (follow-up) Add support for spaces as unknown characters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 24807: (QA follow-up) Remove uneccessary tests

These tests fail now, the code expects a real response from ES in Indexer.pm
but these tests mock 'bulk' and so don't have the necessary fields.

We are testing the same code above and can just add the _id == biblionumber test

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2020-10-16 14:27:07 +00:00
..
atomicupdate Bug 24807: [20.05.x] Add "year" type to improve sorting behaviour 2020-10-16 14:27:07 +00:00
de-DE Bug 25129: Update German (de-DE) web installer sample files for 20.05 2020-09-14 22:48:25 +00:00
en Bug 25629: Fix capitalization in sample notices 2020-07-28 14:59:34 +00:00
fr-CA Bug 25629: Fix capitalization in sample notices 2020-07-28 14:59:34 +00:00
fr-FR Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
it-IT Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
mandatory Bug 17355: DB changes - set is_system for categories 2020-05-04 07:57:21 +01:00
nb-NO Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
pl-PL Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
ru-RU Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
uk-UA Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
account_credit_types.sql Bug 24081: Add credit_types, offset_types and permissions 2020-03-04 14:46:13 +00:00
account_debit_types.sql Bug 25010: Fix typo 'rewewal' in debit types 2020-04-03 14:26:35 +01:00
account_offset_types.sql Bug 24081: (QA follow-up) Fix small typo 2020-03-04 14:46:25 +00:00
audio_alerts.sql
…
backfill_statistics.pl Bug 13795: Remove occurences of unused columns in code 2019-04-18 10:05:51 +00:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
kohastructure.sql Bug 23797: Apply DB changes to kohastructure.sql 2020-07-31 19:49:18 +00:00
labels_upgrade.pl Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
patroncards_upgrade.pl Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
sysprefs.sql Bug 25958: Allow LongOverdue cron to exclude specified lost values 2020-09-04 19:53:36 +00:00
update22to30.pl Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
updatedatabase.pl Bug 26548: Fix typo in updatedatabase 2020-09-29 17:43:50 +00:00
userflags.sql Bug 4461: Adding user flags for managing OPAC problem reports 2020-04-06 11:18:13 +01:00
userpermissions.sql Bug 17268: Add macros table and permissions 2020-05-04 08:25:07 +01:00