Skip to content

Commit

Permalink
properly index repository. datacite/datacite#336
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Sep 23, 2018
1 parent 0c8e2ad commit 3d45a5e
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions app/models/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,20 @@ class Client < ActiveRecord::Base
repository_url: { type: :text },
repository_contacts: { type: :text },
description: { type: :text },
certificates: { type: :object },
types: { type: :object },
additional_names: { type: :object },
subjects: { type: :object },
content_types: { type: :object },
provider_types: { type: :object },
keywords: { type: :object },
software: { type: :object },
certificates: { type: :text },
types: { type: :text },
additional_names: { type: :text },
subjects: { type: :text },
content_types: { type: :text },
provider_types: { type: :text },
keywords: { type: :text },
institutions: { type: :text },
data_accesses: { type: :text },
data_uploads: { type: :text },
data_upload_licenses: { type: :text },
pid_systems: { type: :text },
apis: { type: :text },
software: { type: :text },
created: { type: :date },
updated: { type: :date }
}
Expand Down Expand Up @@ -136,7 +142,7 @@ def as_indexed_json(options={})
end

def self.query_fields
['symbol^10', 'name^10', 'contact_name^10', 'contact_email^10', 'domains', 'url', 'repository.software.name^3', '_all']
['symbol^10', 'name^10', 'contact_name^10', 'contact_email^10', 'domains', 'url', 'repository.software.name^3', 'repository.subjects.text^3', 'repository.certificates.text^3', '_all']
end

def self.query_aggregations
Expand Down

0 comments on commit 3d45a5e

Please sign in to comment.