Summary: | Bug 22605 breaks date of publication range search | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Searching - Elasticsearch | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P5 - low | CC: | david, lucas, nick, victor |
Version: | Main | Keywords: | regression |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the date of publication range searching in the staff interface when using Elasticsearch. It was working in the OPAC, but not the staff interface - caused by a regression from Bug 22605 introduced in Koha 22.05. For example: a search for 2005-2010 in the staff interface advanced search will now display the same results as the OPAC.
|
Version(s) released in: |
22.11.00,21.11.12
|
Circulation function: | |||
Bug Depends on: | 22605 | ||
Bug Blocks: | |||
Attachments: |
Bug 31076: Handle year limits with equal sign or colon
Bug 31076: Handle year limits with equal sign or colon Bug 31076: Handle year limits with equal sign or colon Bug 31076: Handle year limits with equal sign or colon |
Description
Fridolin Somers
2022-07-01 08:50:33 UTC
Created attachment 136805 [details] [review] Bug 31076: Handle year limits with equal sign or colon To test: 1 - Enable ES and index 2 - Set expandedSearchOption to 'show' 3 - Advanced search on staff and opac using Year field on staff and Publication date range on OPAC for: 2005 2005- -2005 <2005 >2005 2005-2010 4 - Confirm ranges don't work on staff side, but do on opac 5 - Apply patch 6 - Repeat searches - they work on both staff and opac 7 - prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Great. We should do the same with above lines : if ( $l =~ /^yr,st-numeric,ge=/ ) { my ( $start, $end ) = ( $l =~ /^yr,st-numeric,ge=(.*) and yr,st-numeric,le=(.*)$/ ); Patch no longer applies 8-(.. Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 31076: Handle year limits with equal sign or colon Using index info to reconstruct a base tree... M Koha/SearchEngine/Elasticsearch/QueryBuilder.pm M t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t CONFLICT (content): Merge conflict in t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Auto-merging Koha/SearchEngine/Elasticsearch/QueryBuilder.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 31076: Handle year limits with equal sign or colon Created attachment 139405 [details] [review] Bug 31076: Handle year limits with equal sign or colon To test: 1 - Enable ES and index 2 - Set expandedSearchOption to 'show' 3 - Advanced search on staff and opac using Year field on staff and Publication date range on OPAC for: 2005 2005- -2005 <2005 >2005 2005-2010 4 - Confirm ranges don't work on staff side, but do on opac 5 - Apply patch 6 - Repeat searches - they work on both staff and opac 7 - prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Created attachment 139437 [details] [review] Bug 31076: Handle year limits with equal sign or colon To test: 1 - Enable ES and index 2 - Set expandedSearchOption to 'show' 3 - Advanced search on staff and opac using Year field on staff and Publication date range on OPAC for: 2005 2005- -2005 <2005 >2005 2005-2010 4 - Confirm ranges don't work on staff side, but do on opac 5 - Apply patch 6 - Repeat searches - they work on both staff and opac 7 - prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Signed-off-by: David Nind <david@davidnind.com> Created attachment 139520 [details] [review] Bug 31076: Handle year limits with equal sign or colon To test: 1 - Enable ES and index 2 - Set expandedSearchOption to 'show' 3 - Advanced search on staff and opac using Year field on staff and Publication date range on OPAC for: 2005 2005- -2005 <2005 >2005 2005-2010 4 - Confirm ranges don't work on staff side, but do on opac 5 - Apply patch 6 - Repeat searches - they work on both staff and opac 7 - prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Go Elastic-team go :D Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for upcoming 22.05.06 release Missing dependencies for 21.05.x, it shouldn't be affected, no backport. Nothing to document it seems, marking resolved. Thanks! Pushed to 21.11 for 21.11.12 |