]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 1 Nov 2022 21:49:11 +0000 (21:49 +0000)
commit5a48731b8ccad8868296b00845a1dd3bf937b609
tree89780ce7c5c74661b76c67a0944a1f616009cfa0
parenteb2dfad0d1c2f1257f9601af195af0acc894bb5f
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>
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]