From 8c0b0a6ac32884b5834183fa3865a7d401ca5791 Mon Sep 17 00:00:00 2001 From: Peter Weber Date: Sat, 15 May 2021 10:06:14 +0200 Subject: [PATCH] search: add missing mappings * Adds missing Elastic Search mappings. * Closes #1873, last bullet point of https://github.com/rero/rero-ils/issues/1873#issuecomment-832002648. Co-Authored-by: Peter Weber --- data/ill_requests.json | 2 +- .../v7/acq_accounts/acq_account-v0.0.1.json | 3 +++ .../mappings/v7/budgets/budget-v0.0.1.json | 3 +++ .../v7/collections/collection-v0.0.1.json | 6 +++++ .../v7/documents/document-v0.0.1.json | 19 +++++++++++---- .../mappings/v7/holdings/holding-v0.0.1.json | 9 +++++++ .../v7/ill_requests/ill_request-v0.0.1.json | 12 ++++++++++ .../items/mappings/v7/items/item-v0.0.1.json | 16 +++++++++++++ .../mappings/v7/loans/loan-ils-v0.0.1.json | 3 +++ .../v7/notifications/notification-v0.0.1.json | 3 +++ .../v7/patron_types/patron_type-v0.0.1.json | 3 +++ .../mappings/v7/patrons/patron-v0.0.1.json | 24 +++++++++++++++++++ .../mappings/v7/vendors/vendor-v0.0.1.json | 6 +++++ 13 files changed, 103 insertions(+), 6 deletions(-) diff --git a/data/ill_requests.json b/data/ill_requests.json index c8992e3fb4..b577a4aa9a 100644 --- a/data/ill_requests.json +++ b/data/ill_requests.json @@ -21,7 +21,7 @@ "title": "L'invention du pain", "year": "1920", "authors": "Erken Beno\u00eet", - "published_in": { + "source": { "journal_title": "Le quotidien du pain", "volume": "2020", "number": "122" diff --git a/rero_ils/modules/acq_accounts/mappings/v7/acq_accounts/acq_account-v0.0.1.json b/rero_ils/modules/acq_accounts/mappings/v7/acq_accounts/acq_account-v0.0.1.json index 61ac2d2b82..d190a99b35 100644 --- a/rero_ils/modules/acq_accounts/mappings/v7/acq_accounts/acq_account-v0.0.1.json +++ b/rero_ils/modules/acq_accounts/mappings/v7/acq_accounts/acq_account-v0.0.1.json @@ -33,6 +33,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, diff --git a/rero_ils/modules/budgets/mappings/v7/budgets/budget-v0.0.1.json b/rero_ils/modules/budgets/mappings/v7/budgets/budget-v0.0.1.json index b48933748a..eadbe9a625 100644 --- a/rero_ils/modules/budgets/mappings/v7/budgets/budget-v0.0.1.json +++ b/rero_ils/modules/budgets/mappings/v7/budgets/budget-v0.0.1.json @@ -28,6 +28,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, diff --git a/rero_ils/modules/collections/mappings/v7/collections/collection-v0.0.1.json b/rero_ils/modules/collections/mappings/v7/collections/collection-v0.0.1.json index beeeaa1e3e..1989888040 100644 --- a/rero_ils/modules/collections/mappings/v7/collections/collection-v0.0.1.json +++ b/rero_ils/modules/collections/mappings/v7/collections/collection-v0.0.1.json @@ -53,6 +53,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -60,6 +63,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, diff --git a/rero_ils/modules/documents/mappings/v7/documents/document-v0.0.1.json b/rero_ils/modules/documents/mappings/v7/documents/document-v0.0.1.json index a4a85d2940..9e7db3fa3d 100644 --- a/rero_ils/modules/documents/mappings/v7/documents/document-v0.0.1.json +++ b/rero_ils/modules/documents/mappings/v7/documents/document-v0.0.1.json @@ -147,6 +147,10 @@ } } }, + "authorized_access_point": { + "type": "text", + "search_analyzer": "standard" + }, "autocomplete_title": { "type": "text", "analyzer": "autocomplete", @@ -449,13 +453,15 @@ } }, "startDate": { - "type": "date", - "format": "yyyy", + "type": "integer", "index": false }, "endDate": { - "type": "date", - "format": "yyyy", + "type": "integer", + "index": false + }, + "original_date": { + "type": "integer", "index": false }, "type": { @@ -801,6 +807,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -1172,7 +1181,7 @@ "mediaType": { "type": "keyword" }, - "Carrier": { + "carrierType": { "type": "keyword" } } diff --git a/rero_ils/modules/holdings/mappings/v7/holdings/holding-v0.0.1.json b/rero_ils/modules/holdings/mappings/v7/holdings/holding-v0.0.1.json index 7d8ba80717..13eede5eaf 100644 --- a/rero_ils/modules/holdings/mappings/v7/holdings/holding-v0.0.1.json +++ b/rero_ils/modules/holdings/mappings/v7/holdings/holding-v0.0.1.json @@ -19,6 +19,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -26,6 +29,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -33,6 +39,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, diff --git a/rero_ils/modules/ill_requests/mappings/v7/ill_requests/ill_request-v0.0.1.json b/rero_ils/modules/ill_requests/mappings/v7/ill_requests/ill_request-v0.0.1.json index 8115ac557e..21d2f9d61d 100644 --- a/rero_ils/modules/ill_requests/mappings/v7/ill_requests/ill_request-v0.0.1.json +++ b/rero_ils/modules/ill_requests/mappings/v7/ill_requests/ill_request-v0.0.1.json @@ -24,6 +24,9 @@ "type": "text", "copy_to": "patron.facet" }, + "type": { + "type": "keyword" + }, "facet": { "type": "keyword" } @@ -43,6 +46,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -54,6 +60,9 @@ "authors": { "type": "text" }, + "publisher": { + "type": "text" + }, "year": { "type": "text" }, @@ -88,6 +97,9 @@ } } }, + "pages": { + "type": "text" + }, "organisation": { "properties": { "pid": { 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 89e764ff82..084a4a10e8 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 @@ -243,6 +243,22 @@ "legacy_checkout_count": { "type": "integer" }, + "legacy_circulation_rules": { + "properties": { + "allow_request": { + "type": "boolean" + }, + "floats": { + "type": "boolean" + }, + "loan_duration": { + "type": "integer" + }, + "use_item_specific_rules": { + "type": "boolean" + } + } + }, "circulation_rules": { "properties": { "use_item_specific_rules": { diff --git a/rero_ils/modules/loans/mappings/v7/loans/loan-ils-v0.0.1.json b/rero_ils/modules/loans/mappings/v7/loans/loan-ils-v0.0.1.json index 17743327ac..108a66b035 100644 --- a/rero_ils/modules/loans/mappings/v7/loans/loan-ils-v0.0.1.json +++ b/rero_ils/modules/loans/mappings/v7/loans/loan-ils-v0.0.1.json @@ -90,6 +90,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, diff --git a/rero_ils/modules/notifications/mappings/v7/notifications/notification-v0.0.1.json b/rero_ils/modules/notifications/mappings/v7/notifications/notification-v0.0.1.json index 57142cec15..d4d381251b 100644 --- a/rero_ils/modules/notifications/mappings/v7/notifications/notification-v0.0.1.json +++ b/rero_ils/modules/notifications/mappings/v7/notifications/notification-v0.0.1.json @@ -28,6 +28,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, diff --git a/rero_ils/modules/patron_types/mappings/v7/patron_types/patron_type-v0.0.1.json b/rero_ils/modules/patron_types/mappings/v7/patron_types/patron_type-v0.0.1.json index 57996b1e80..2db9a9f1e9 100644 --- a/rero_ils/modules/patron_types/mappings/v7/patron_types/patron_type-v0.0.1.json +++ b/rero_ils/modules/patron_types/mappings/v7/patron_types/patron_type-v0.0.1.json @@ -62,6 +62,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, diff --git a/rero_ils/modules/patrons/mappings/v7/patrons/patron-v0.0.1.json b/rero_ils/modules/patrons/mappings/v7/patrons/patron-v0.0.1.json index 244c02239a..9cf153adb6 100644 --- a/rero_ils/modules/patrons/mappings/v7/patrons/patron-v0.0.1.json +++ b/rero_ils/modules/patrons/mappings/v7/patrons/patron-v0.0.1.json @@ -23,6 +23,9 @@ "last_name_sort": { "type": "keyword" }, + "gender": { + "type": "keyword" + }, "birth_date": { "type": "date", "fields": { @@ -88,6 +91,9 @@ "home_phone": { "type": "keyword" }, + "phone": { + "type": "keyword" + }, "business_phone": { "type": "keyword" }, @@ -106,6 +112,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -146,6 +155,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -153,6 +165,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -186,6 +201,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -193,9 +211,15 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, + "keep_history": { + "type": "boolean" + }, "_created": { "type": "date" }, diff --git a/rero_ils/modules/vendors/mappings/v7/vendors/vendor-v0.0.1.json b/rero_ils/modules/vendors/mappings/v7/vendors/vendor-v0.0.1.json index 16bc31d8d0..4d58bd4fb0 100644 --- a/rero_ils/modules/vendors/mappings/v7/vendors/vendor-v0.0.1.json +++ b/rero_ils/modules/vendors/mappings/v7/vendors/vendor-v0.0.1.json @@ -35,6 +35,9 @@ "properties": { "pid": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -61,6 +64,9 @@ "home_phone": { "type": "keyword" }, + "phone": { + "type": "keyword" + }, "postal_code": { "type": "keyword" },