Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/datacite/lupo
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 23, 2020
2 parents bb441c0 + e1a47f4 commit 7a70d92
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
28 changes: 14 additions & 14 deletions app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,16 @@ 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
links_with_schema_org = total.positive? ? facet_by_cumulative_year(response.aggregations.link_checks_has_schema_org.buckets) : nil
link_checks_schema_org_id = total.positive? ? response.aggregations.link_checks_schema_org_id.value : nil
link_checks_dc_identifier = total.positive? ? response.aggregations.link_checks_dc_identifier.value : nil
link_checks_citation_doi = total.positive? ? response.aggregations.link_checks_citation_doi.value : nil
links_checked = total.positive? ? response.aggregations.links_checked.value : nil
# links_with_schema_org = total.positive? ? facet_by_cumulative_year(response.aggregations.link_checks_has_schema_org.buckets) : nil
# link_checks_schema_org_id = total.positive? ? response.aggregations.link_checks_schema_org_id.value : nil
# link_checks_dc_identifier = total.positive? ? response.aggregations.link_checks_dc_identifier.value : nil
# link_checks_citation_doi = total.positive? ? response.aggregations.link_checks_citation_doi.value : nil
# links_checked = total.positive? ? response.aggregations.links_checked.value : nil

citations = total.positive? ? metric_facet_by_year(response.aggregations.citations.buckets) : nil
views = total.positive? ? metric_facet_by_year(response.aggregations.views.buckets) : nil
Expand All @@ -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,
# "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,
citations: citations,
views: views,
downloads: downloads,
Expand Down
14 changes: 7 additions & 7 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,13 @@ def self.query_aggregations
prefixes: { terms: { field: 'prefix', size: 15, min_doc_count: 1 } },
schema_versions: { terms: { field: 'schema_version', size: 15, min_doc_count: 1 } },
link_checks_status: { terms: { field: 'landing_page.status', size: 15, min_doc_count: 1 } },
link_checks_has_schema_org: { terms: { field: 'landing_page.hasSchemaOrg', size: 2, min_doc_count: 1 } },
link_checks_schema_org_id: { value_count: { field: "landing_page.schemaOrgId" } },
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 } },
# link_checks_has_schema_org: { terms: { field: 'landing_page.hasSchemaOrg', size: 2, min_doc_count: 1 } },
# link_checks_schema_org_id: { value_count: { field: "landing_page.schemaOrgId" } },
# 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 } },
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 7a70d92

Please sign in to comment.