Summary: | Elasticsearch - Set default fields for sorting in mappings.yaml | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Searching - Elasticsearch | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Julian Maurice <julian.maurice> |
Severity: | major | ||
Priority: | P5 - low | CC: | david.bourgault, fridolin.somers, jonathan.druart, julian.maurice, severine.queune, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 19482 | ||
Attachments: |
Bug 19481 - Set default sort options as sortable in ES default mappings
Bug 19481 - Set default sort options as sortable in ES default mappings Bug 19481 - Set default sort options as sortable in ES default mappings |
Description
Nick Clemens (kidclamp)
2017-10-18 10:31:23 UTC
Created attachment 68241 [details] [review] Bug 19481 - Set default sort options as sortable in ES default mappings To test: 1 - Setup Koha with ES 2 - perform a search 3 - try sorting by pubdate, acqdate, popularity, or title 4 - Search fails! 5 - Apply patch 6 - visit: /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 7 - Re-index ES 8 - Perform search 9 - All sorting options should work For UNIMARC, mapping for sorting by popularity is not really defined. We could use 942$0 like in MARC21. Created attachment 68788 [details] [review] Bug 19481 - Set default sort options as sortable in ES default mappings To test: 1 - Setup Koha with ES 2 - perform a search 3 - try sorting by pubdate, acqdate, popularity, or title 4 - Search fails! 5 - Apply patch 6 - visit: /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 7 - Re-index ES 8 - Perform search 9 - All sorting options should work Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Test worked as planned, however sorting by title and author seemed strange. I assume the issue wasn't introduced by this bug, but looking at the results list, it did not seem alphabetical to me. (In reply to David Bourgault from comment #4) > Test worked as planned, however sorting by title and author seemed strange. > I assume the issue wasn't introduced by this bug, but looking at the results > list, it did not seem alphabetical to me. See bug 19581 and bug 18827 for ordering issues Patch works as described (except for popularity when in UNIMARC, since the field is not defined). But I wonder about 6th step in test plan. Shouldn't it be done in an updatedatabase script ? (In reply to Julian Maurice from comment #6) > Patch works as described (except for popularity when in UNIMARC, since the > field is not defined). > But I wonder about 6th step in test plan. Shouldn't it be done in an > updatedatabase script ? I am not sure - if someone has custom mappings setup for some reasonn I don't think we want to alter them. I think i would prefer to follow up on 19542 and add a warning if standard sort fields are not defined. Does that sound reasonable? (In reply to Nick Clemens from comment #7) > I am not sure - if someone has custom mappings setup for some reasonn I > don't think we want to alter them. > > I think i would prefer to follow up on 19542 and add a warning if standard > sort fields are not defined. Does that sound reasonable? Ok Created attachment 69224 [details] [review] Bug 19481 - Set default sort options as sortable in ES default mappings To test: 1 - Setup Koha with ES 2 - perform a search 3 - try sorting by pubdate, acqdate, popularity, or title 4 - Search fails! 5 - Apply patch 6 - visit: /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 7 - Re-index ES 8 - Perform search 9 - All sorting options should work Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Pushed to master for 17.11, thanks to everybody involved! |