]> git.koha-community.org Git - koha.git/commit
Bug 25375: Fix 'available' facet in elasticsearch
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 29 Apr 2020 14:13:08 +0000 (16:13 +0200)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Mon, 14 Nov 2022 17:16:23 +0000 (18:16 +0100)
commitfc2a5c514ca26aacf61dab6f3008ed7eef5667ac
tree8b7b7630925d7decdf32afa2a1af5ed6ba3f591b
parent7d7d8e111820ae3fe466856ed62f6b822883e281
Bug 25375: Fix 'available' facet in elasticsearch

Add a new boolean ES field named 'available', which is true if at least
one item is available, which means the item is not on loan, not
"notforloan", not withdrawn, not lost and not damaged

A full indexation is required

Test plan:
1. Apply patch and run updatedatabase.pl
2. Run `misc/search_tools/rebuild_elasticsearch.pl -d -b`
3. Make sure you have some biblios whose items are all unavailable, some
   biblios whose items are all available, and some biblios with at least
   one item available and at least one item unavailable
4. Use the 'available' filter on both opac and intranet and make sure it
   works as expected.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d79361c51e9349a5bbbe3212fde40d3ad4d6b946)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5a48731b8ccad8868296b00845a1dd3bf937b609)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Koha/SearchEngine/Elasticsearch.pm
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
admin/searchengine/elasticsearch/mappings.yaml
installer/data/mysql/atomicupdate/bug-25375.perl [new file with mode: 0644]