Skip to content

Commit

Permalink
don't export repos with non-datacite dois
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Mar 7, 2020
1 parent 2385769 commit c94ba57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def query(query, options={})
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]
must_not << { terms: { provider_id: ["crossref", "medra", "op"] }} if options[:exclude_registration_agencies]
must_not << { terms: { symbol: !%w(CROSSREF.CITATIONS MEDRA.CITATIONS JALC.CITATIONS KISTI.CITATIONS OP.CITATIONS) }} if options[:exclude_registration_agencies]
elsif self.name == "Doi"
must << { terms: { aasm_state: options[:state].to_s.split(",") }} if options[:state].present?
must << { range: { registered: { gte: "#{options[:registered].split(",").min}||/y", lte: "#{options[:registered].split(",").max}||/y", format: "yyyy" }}} if options[:registered].present?
Expand All @@ -243,7 +243,7 @@ def query(query, options={})
must << { term: { "client.re3data_id" => options[:re3data_id].gsub("/", '\/').upcase }} if options[:re3data_id].present?
must << { term: { "client.opendoar_id" => options[:opendoar_id] }} if options[:opendoar_id].present?
must << { terms: { "client.certificate" => options[:certificate].split(",") }} if options[:certificate].present?
must_not << { terms: { provider_id: ["crossref", "medra", "op"] }} if options[:exclude_registration_agencies]
must_not << { terms: { "client.symbol" => !%w(CROSSREF.CITATIONS MEDRA.CITATIONS JALC.CITATIONS KISTI.CITATIONS OP.CITATIONS) }} if options[:exclude_registration_agencies]
elsif self.name == "Event"
must << { term: { subj_id: URI.decode(options[:subj_id]) }} if options[:subj_id].present?
must << { term: { obj_id: URI.decode(options[:obj_id]) }} if options[:obj_id].present?
Expand Down

0 comments on commit c94ba57

Please sign in to comment.