Skip to content

Commit

Permalink
subject and source removed from the api
Browse files Browse the repository at this point in the history
This has breaking changes for fabrica
  • Loading branch information
sarala committed Apr 23, 2020
1 parent a41e161 commit f544650
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ def index
schema_versions = total.positive? ? facet_by_schema(response.aggregations.schema_versions.buckets) : nil

affiliations = total.positive? ? facet_by_combined_key(response.aggregations.affiliations.buckets) : nil
sources = total.positive? ? facet_by_key(response.aggregations.sources.buckets) : nil
subjects = total.positive? ? facet_by_key(response.aggregations.subjects.buckets) : nil
# sources = total.positive? ? facet_by_key(response.aggregations.sources.buckets) : nil
# subjects = total.positive? ? facet_by_key(response.aggregations.subjects.buckets) : nil
certificates = total.positive? ? facet_by_key(response.aggregations.certificates.buckets) : nil

link_checks_status = total.positive? ? facet_by_cumulative_year(response.aggregations.link_checks_status.buckets) : nil
Expand Down Expand Up @@ -196,14 +196,14 @@ def index
prefixes: prefixes,
certificates: certificates,
"schemaVersions" => schema_versions,
sources: sources,
# sources: sources,
"linkChecksStatus" => link_checks_status,
# "linksChecked" => links_checked,
# "linksWithSchemaOrg" => links_with_schema_org,
# "linkChecksSchemaOrgId" => link_checks_schema_org_id,
# "linkChecksDcIdentifier" => link_checks_dc_identifier,
# "linkChecksCitationDoi" => link_checks_citation_doi,
subjects: subjects,
# subjects: subjects,
citations: citations,
views: views,
downloads: downloads,
Expand Down
4 changes: 2 additions & 2 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ def self.query_aggregations
# link_checks_dc_identifier: { value_count: { field: "landing_page.dcIdentifier" } },
# link_checks_citation_doi: { value_count: { field: "landing_page.citationDoi" } },
# links_checked: { value_count: { field: "landing_page.checked" } },
sources: { terms: { field: 'source', size: 15, min_doc_count: 1 } },
subjects: { terms: { field: 'subjects.subject', size: 15, min_doc_count: 1 } },
# sources: { terms: { field: 'source', size: 15, min_doc_count: 1 } },
# subjects: { terms: { field: 'subjects.subject', size: 15, min_doc_count: 1 } },
certificates: { terms: { field: 'client.certificate', size: 15, min_doc_count: 1 } },
views: {
date_histogram: { field: 'publication_year', interval: 'year', format: 'year', order: { _key: "desc" }, min_doc_count: 1 },
Expand Down

0 comments on commit f544650

Please sign in to comment.