Bug 20492 - Add missing case for advanced search year limit in _fix_limit_special_cases
Summary: Add missing case for advanced search year limit in _fix_limit_special_cases
Status: RESOLVED DUPLICATE of bug 22524
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: David Gustafsson
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-29 09:57 UTC by David Gustafsson
Modified: 2021-09-06 15:20 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 20492: Add missing case for advanced search year limit (1.61 KB, patch)
2018-03-29 10:15 UTC, David Gustafsson
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Gustafsson 2018-03-29 09:57:35 UTC

    
Comment 1 David Gustafsson 2018-03-29 09:59:25 UTC
If choosing "more options" in advanced search, and using "year" limit, this will not be converted to elastic query syntax format. Added a case to fix this.
Comment 2 David Gustafsson 2018-03-29 10:15:42 UTC
Created attachment 73412 [details] [review]
Bug 20492: Add missing case for advanced search year limit

Add missing case for when using "year" limit in advanced search,
which results the zebra limit "yr,st-numeric=YYYY-YYYY".
This will now be convered to an ElasticSearch range.

How to test:
1) Perform a year limit search by choosing "More options" in
   advanced search page and enter a year range that should
   produce results.
2) This should not produce the expected results.
3) Apply patch
4) Perform the same search again, it should now produce the
   expected results.

Sponsored-by: Gothenburg University Library
Comment 3 Cab Vinton 2018-07-02 09:36:38 UTC
It would be helpful to know what specifically the ElasticSearch syntax format is supposed to look like.

Sandbox 13 is still showing "yr,st-numeric=YYYY-YYYY" for the Year limit search in both the OPAC & staff client.
Comment 4 David Gustafsson 2018-07-02 11:18:50 UTC
Yes, but it will be converted to the right format, so both formats are supported.
Comment 5 Josef Moravec 2019-03-01 09:08:59 UTC
Hi David, 

This does work, however only in OPAC, publication year in staff is not affected and still does not work in Elasticsearch

Also, I think the test for this change is needed...
Comment 6 Katrin Fischer 2020-09-20 22:33:36 UTC
I am not sure how this relates to bug 24807. I applied the patch and reindexed my records with -d, but the search in OPAC doesn't work for me. I did a date range search for "2000-", but almost all records are way before 2000, both in 008 and 260/264.
Comment 7 David Gustafsson 2021-09-06 15:19:41 UTC
Thing this have now been fixed in https://github.com/Koha-Community/Koha/commit/2293e6597c69d55ce5916b7a31029f13d65d4fea so closing this.
Comment 8 David Gustafsson 2021-09-06 15:20:58 UTC

*** This bug has been marked as a duplicate of bug 22524 ***