From 785bef8a1f0d41d80725afdbff7a771143b6119a Mon Sep 17 00:00:00 2001 From: Mike Bennett Date: Thu, 19 Jan 2023 16:41:38 +0000 Subject: [PATCH 1/2] Fix ES index definition to match the JSON data structure --- app/models/doi.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/doi.rb b/app/models/doi.rb index ac7915154..b49eb8143 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -283,7 +283,7 @@ class Doi < ApplicationRecord edition: { type: :keyword }, contributors: { type: :object, properties: { contributorType: { type: :text }, - contributorName: { type: :text }, + name: { type: :text }, nameType: { type: :text }, givenName: { type: :text }, familyName: { type: :text }, @@ -301,6 +301,7 @@ class Doi < ApplicationRecord funderName: { type: :keyword }, funderIdentifier: { type: :keyword, normalizer: "keyword_lowercase" }, funderIdentifierType: { type: :keyword }, + schemeUri: {type: :keyword} awardNumber: { type: :keyword }, awardUri: { type: :keyword }, awardTitle: { type: :keyword }, @@ -308,6 +309,7 @@ class Doi < ApplicationRecord indexes :dates, type: :object, properties: { date: { type: :text }, dateType: { type: :keyword }, + dateInformation: {type: :keyword}, } indexes :geo_locations, type: :object, properties: { geoLocationPoint: { type: :object }, From f64c6c1a3f2dc98a190408b3c8ec7e3af5e6401f Mon Sep 17 00:00:00 2001 From: Mike Bennett Date: Thu, 19 Jan 2023 16:48:41 +0000 Subject: [PATCH 2/2] Fix missing comma and (hopefully) appease rubocop --- app/models/doi.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/doi.rb b/app/models/doi.rb index b49eb8143..e5c0cb729 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -301,7 +301,7 @@ class Doi < ApplicationRecord funderName: { type: :keyword }, funderIdentifier: { type: :keyword, normalizer: "keyword_lowercase" }, funderIdentifierType: { type: :keyword }, - schemeUri: {type: :keyword} + schemeUri: { type: :keyword }, awardNumber: { type: :keyword }, awardUri: { type: :keyword }, awardTitle: { type: :keyword }, @@ -309,7 +309,7 @@ class Doi < ApplicationRecord indexes :dates, type: :object, properties: { date: { type: :text }, dateType: { type: :keyword }, - dateInformation: {type: :keyword}, + dateInformation: { type: :keyword }, } indexes :geo_locations, type: :object, properties: { geoLocationPoint: { type: :object },