Go to file
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
C4 Bug 25265: [20.05.x] Prevent double reindex of the same item in batchmod 2020-10-16 14:15:22 +00:00
Koha Bug 24807: [20.05.x] Add "year" type to improve sorting behaviour 2020-10-16 14:27:07 +00:00
acqui Bug 25750: fix fallback to ecost_tax_included/ecost_tax_excluded 2020-09-03 15:40:42 +00:00
admin Bug 24807: [20.05.x] Add "year" type to improve sorting behaviour 2020-10-16 14:27:07 +00:00
api/v1 Bug 26271: Add null to the list of accepted account_line data types 2020-09-14 21:35:32 +00:00
authorities Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
basket Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
catalogue Bug 24663: (follow-up) Remove authnotrequired if set to 0 2020-08-31 20:04:45 +00:00
cataloguing Bug 25265: [20.05.x] Prevent double reindex of the same item in batchmod 2020-10-16 14:15:22 +00:00
circ Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
clubs Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
course_reserves Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
debian Bug 25778: Fix var scope in koha-plack for PERL5LIB and KOHA_HOME 2020-09-04 15:23:16 +00:00
docs Bug 21395: (QA follow-up) Remove some introduced issues 2020-07-13 16:45:15 +00:00
errors Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
etc Bug 26253: (bug 22857 follow-up) Remove duplicated mana_config in etc/koha-conf.xml 2020-08-31 20:06:11 +00:00
ill Bug 23173: (follow-up) Small improvements in efficiency 2020-04-06 11:05:09 +01:00
installer Bug 24807: [20.05.x] Add "year" type to improve sorting behaviour 2020-10-16 14:27:07 +00:00
koha-tmpl Bug 24807: [20.05.x] Add "year" type to improve sorting behaviour 2020-10-16 14:27:07 +00:00
labels Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
members Bug 26076: (QA Follow up) Prevent error by using a fresh resultset 2020-09-04 17:56:04 +00:00
misc Bug 26420: Use translated notices for overdue_notices.pl 2020-10-15 21:50:26 +00:00
offline_circ Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
opac Bug 26388: Do not show 'Renew all' or 'Renew selected' if no renewable items 2020-09-14 22:19:34 +00:00
patron_lists Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
patroncards Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
plugins Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
pos Bug 26023: Properly secure the cashup and refund actions 2020-09-04 17:43:21 +00:00
reports Bug 17801: Use issuedate for limits in Most Circulated Items 2020-09-14 21:43:59 +00:00
reserve Bug 24683: Subroutine name changed (fix), no code logic changed This is the intermediate refactor: renamed subroutine only. 2020-09-04 17:48:22 +00:00
reviews Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
rotating_collections Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
serials Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
services
…
skel
…
suggestion Bug 24819: (follow-up) Rename suggestor to suggester 2020-04-20 13:36:42 +01:00
svc Bug 26331: Make svc/letters/preview executable 2020-09-14 21:22:22 +00:00
t Bug 24807: [20.05.x] Add "year" type to improve sorting behaviour 2020-10-16 14:27:07 +00:00
tags Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
tmp/modified_authorities
…
tools Bug 25265: [20.05.x] Prevent double reindex of the same item in batchmod 2020-10-16 14:15:22 +00:00
virtualshelves Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
xt Bug 26265: add a plan for tests 2020-09-02 14:32:44 +00:00
.editorconfig Bug 24774: Set JSON indentation of 2 spaces in .editorconfig 2020-03-19 09:24:52 +00:00
.eslintrc.json
…
.gitignore
…
.htaccess
…
.mailmap
…
.perlcriticrc Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
.scss-lint.yml
…
INSTALL
…
Koha.pm Increment version for 20.05.04 release 2020-09-22 23:14:44 +00:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 26265: Add missing xt dir 2020-09-02 14:32:13 +00:00
README
…
README.md
…
README.robots
…
about.pl Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
changelanguage.pl
…
cpanfile Bug 25723: Drop DateTime::Set from cpanfile 2020-07-27 17:38:47 +00:00
fix-perl-path.PL Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
gulpfile.js Bug 26228: Update gulpfile to work with Node.js v12 2020-09-03 14:49:31 +00:00
help.pl
…
koha_perl_deps.pl Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
kohaversion.pl
…
mainpage.pl Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
package.json Bug 26228: Update gulpfile to work with Node.js v12 2020-09-03 14:49:31 +00:00
rewrite-config.PL Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11 2020-07-28 14:46:44 +00:00
yarn.lock Bug 26228: Update gulpfile to work with Node.js v12 2020-09-03 14:49:31 +00:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo