Skip to content

Commit

Permalink
fix resource-type-general facet for dois
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 16, 2018
1 parent 6b6091a commit 4357d18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def index
client_id: params[:client_id],
prefix: params[:prefix],
person_id: params[:person_id],
resource_type_id: camelize_str(params[:resource_type_id]),
resource_type_id: params[:resource_type_id],
schema_version: params[:schema_version],
source: params[:source],
page: page,
Expand Down Expand Up @@ -139,14 +139,14 @@ def index
"total-pages" => total_pages,
page: page[:number],
states: states,
resource_types: resource_types,
"resource-types" => resource_types,
years: years,
created: created,
registered: registered,
providers: providers,
clients: clients,
prefixes: prefixes,
schema_versions: schema_versions,
"schema-versions" => schema_versions,
sources: sources
}.compact

Expand Down
2 changes: 1 addition & 1 deletion app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def query(query, options={})
must = []
must << { multi_match: { query: query, fields: query_fields, type: "phrase_prefix", max_expansions: 50 }} if query.present?
must << { term: { aasm_state: options[:state] }} if options[:state].present?
must << { term: { resource_type_general: options[:resource_type_id] }} if options[:resource_type_id].present?
must << { term: { resource_type_id: options[:resource_type_id] }} if options[:resource_type_id].present?
must << { terms: { provider_id: options[:provider_id].split(",") }} if options[:provider_id].present?
must << { terms: { client_id: options[:client_id].split(",") }} if options[:client_id].present?
must << { term: { prefix: options[:prefix] }} if options[:prefix].present?
Expand Down

0 comments on commit 4357d18

Please sign in to comment.