From da465fb803c3fe68e4177f364125d5e431f845ab Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Tue, 30 Jul 2019 11:43:33 +0200 Subject: [PATCH] fix formatting error --- app/models/concerns/indexable.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index 50815f3c1..9ea246adb 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -182,7 +182,8 @@ def query(query, options={}) must << { range: { created: { gte: "#{options[:year].split(",").min}||/y", lte: "#{options[:year].split(",").max}||/y", format: "yyyy" }}} if options[:year].present? must << { terms: { "software.raw" => options[:software].split(",") }} if options[:software].present? must << { terms: { certificate: options[:certificate].split(",") }} if options[:certificate].present? - must << { terms: { repository_type: options[:repository_type].split(",") }} if options[:repository_type].present?must << { term: { re3data_id: options[:re3data_id].gsub("/", '\/') }} if options[:re3data_id].present? + must << { terms: { repository_type: options[:repository_type].split(",") }} if options[:repository_type].present? + must << { term: { re3data_id: options[:re3data_id].gsub("/", '\/') }} if options[:re3data_id].present? must << { term: { opendoar_id: options[:opendoar_id] }} if options[:opendoar_id].present? must << { term: { client_type: options[:client_type] }} if options[:client_type].present? must_not << { exists: { field: "deleted_at" }} unless options[:include_deleted]