Bug 22524: Fix publication date and year search with Elasticsearch
authorEre Maijala <ere.maijala@helsinki.fi>
Tue, 16 Apr 2019 13:26:40 +0000 (16:26 +0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 26 Jul 2019 15:16:11 +0000 (16:16 +0100)
commit2293e6597c69d55ce5916b7a31029f13d65d4fea
tree1ca0b06a6298876f166ffe40b9fa904e2a5ada97
parent0b2a9b5872c72ee6b0f17d32e20c8e59231f03f3
Bug 22524: Fix publication date and year search with Elasticsearch

Also fixes the mappings.yaml to use correct field name (left over issue from bug 19575), so reset mappings and reindex before testing.

Test plan:
1. Reset mappings and reindex biblios.
2. Check that tests in t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t pass.
3. Try that all of the following year range type work in publication date search and year limit in advanced search:
yyyy
yyyy-yyyy
-yyyy
yyyy-

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
admin/searchengine/elasticsearch/mappings.yaml
t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t