diff --git a/rero_ils/config.py b/rero_ils/config.py index 6fe9bb5053..cc11b5e0c3 100644 --- a/rero_ils/config.py +++ b/rero_ils/config.py @@ -2495,7 +2495,7 @@ def _(x): default_order='asc' ) RECORDS_REST_SORT_OPTIONS['items']['enumeration_chronology'] = dict( - fields=['-enumerationAndChronology'], title='Enumeration and Chronology', + fields=['-enumerationAndChronology.sort'], title='Enumeration and Chronology', default_order='desc' ) RECORDS_REST_SORT_OPTIONS['items']['library'] = dict( @@ -2509,7 +2509,7 @@ def _(x): ) RECORDS_REST_DEFAULT_SORT['items'] = dict( - query='bestmatch', noquery='enum_chronology') + query='bestmatch', noquery='enumeration_chronology') # ------ ITEM TYPES SORT RECORDS_REST_SORT_OPTIONS['item_types']['name'] = dict( diff --git a/rero_ils/modules/items/mappings/v7/items/item-v0.0.1.json b/rero_ils/modules/items/mappings/v7/items/item-v0.0.1.json index 1edb3a3791..5ee6b692cd 100644 --- a/rero_ils/modules/items/mappings/v7/items/item-v0.0.1.json +++ b/rero_ils/modules/items/mappings/v7/items/item-v0.0.1.json @@ -56,7 +56,14 @@ } }, "enumerationAndChronology": { - "type": "keyword" + "type": "keyword", + "fields": { + "sort": { + "type": "icu_collation_keyword", + "index": false, + "numeric": true + } + } }, "location": { "properties": {