Bug 18827

Summary: Elasticsearch mappings - not displayed or retrieved in saved order
Product: Koha Reporter: Nick Clemens <nick>
Component: Searching - ElasticsearchAssignee: Nick Clemens <nick>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P5 - low CC: david, frank.hansen, fridolin.somers, jonathan.druart, kyle, marjorie.barry-vila, severine.queune
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22340
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35265
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14899    
Bug Blocks:    

Description Nick Clemens 2017-06-19 20:12:52 UTC
The mappings listed under 'Biblios' and 'Authorities' are draggable - this allows ordering of fields.

The ordering affects the id field in the search_marc_map table

When retrieving for display or mapping we are not ordering by the this field.


In general I am not sure if we are gaining anything with this ordering:

https://www.elastic.co/guide/en/elasticsearch/guide/current/_sorting.html
" When sorting on fields with more than one value, remember that the values do not have any intrinsic order; a multivalue field is just a bag of values. Which one do you choose to sort on?"

I think we can switch to the idea that a single field per index should be chosen for ordering:
author = 100 (only make this one sortable)
author = 700
author = 245c


or, in the case of authorities, we should expect a single field to populate the field for sorting (100, 110, 150 ... are alldefined as 'main-heading' - but each record should only have a single one of these field)
Comment 1 Joonas Kylmälä 2018-10-09 11:45:09 UTC
*** Bug 19922 has been marked as a duplicate of this bug. ***
Comment 2 Fridolin Somers 2020-11-10 13:55:34 UTC
Still valid.
Means drag-and-drop is actually useless ?
Comment 3 Katrin Fischer 2023-09-30 19:12:13 UTC
(In reply to Fridolin Somers from comment #2)
> Still valid.
> Means drag-and-drop is actually useless ?

Would still be good to know?
Comment 4 Fridolin Somers 2023-10-28 20:39:53 UTC
Still valid.
Mappings are sorted by search field then marc field.
This makes sens to me.

What is the purpose of drag and drop ?
Comment 5 Jonathan Druart 2023-11-03 13:35:26 UTC
This is a behaviour we had on the Solr version, and I do remember it was useful at the time.
I guess it was used for ordering, as Nick described in comment 0. If ES does not keep the order of the fields and it's no longer relevant for ES, then yes we can remove drag&drop feature.
Comment 6 Fridolin Somers 2023-11-06 06:42:51 UTC
Created Bug 35265
Comment 7 Owen Leonard 2023-11-06 11:54:02 UTC
Should this bug be closed? WONTFIX?
Comment 8 David Nind 2023-11-06 23:47:31 UTC
I think so, from reading the comments.

Ability to drag and drop being removed in bug 35265.

Feel to change status if you disagree!