Skip to content

Commit

Permalink
Merge pull request #488 from datacite/reduce_facets
Browse files Browse the repository at this point in the history
Facets limited to 10
  • Loading branch information
Martin Fenner authored Apr 24, 2020
2 parents abdac33 + 4f35562 commit fa5d935
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions app/models/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ def self.query_aggregations
{
years: { date_histogram: { field: 'created', interval: 'year', format: 'year', order: { _key: "desc" }, min_doc_count: 1 },
aggs: { bucket_truncate: { bucket_sort: { size: 10 } } } },
cumulative_years: { terms: { field: 'cumulative_years', size: 15, min_doc_count: 1, order: { _count: "asc" } } },
providers: { terms: { field: 'provider_id', size: 15, min_doc_count: 1 } },
software: { terms: { field: 'software.keyword', size: 15, min_doc_count: 1 } },
client_types: { terms: { field: 'client_type', size: 15, min_doc_count: 1 } },
repository_types: { terms: { field: 'repository_type', size: 15, min_doc_count: 1 } },
certificates: { terms: { field: 'certificate', size: 15, min_doc_count: 1 } }
cumulative_years: { terms: { field: 'cumulative_years', size: 10, min_doc_count: 1, order: { _count: "asc" } } },
providers: { terms: { field: 'provider_id', size: 10, min_doc_count: 1 } },
software: { terms: { field: 'software.keyword', size: 10, min_doc_count: 1 } },
client_types: { terms: { field: 'client_type', size: 10, min_doc_count: 1 } },
repository_types: { terms: { field: 'repository_type', size: 10, min_doc_count: 1 } },
certificates: { terms: { field: 'certificate', size: 10, min_doc_count: 1 } }
}
end

Expand Down
14 changes: 7 additions & 7 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -561,20 +561,20 @@ def self.query_aggregations
aggs: { bucket_truncate: { bucket_sort: { size: 10 } } } },
registered: { date_histogram: { field: 'registered', interval: 'year', format: 'year', order: { _key: "desc" }, min_doc_count: 1 },
aggs: { bucket_truncate: { bucket_sort: { size: 10 } } } },
providers: { terms: { field: 'provider_id_and_name', size: 15, min_doc_count: 1} },
clients: { terms: { field: 'client_id_and_name', size: 15, min_doc_count: 1 } },
affiliations: { terms: { field: 'affiliation_id_and_name', size: 15, min_doc_count: 1 } },
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 } },
providers: { terms: { field: 'provider_id_and_name', size: 10, min_doc_count: 1} },
clients: { terms: { field: 'client_id_and_name', size: 10, min_doc_count: 1 } },
affiliations: { terms: { field: 'affiliation_id_and_name', size: 10, min_doc_count: 1 } },
prefixes: { terms: { field: 'prefix', size: 10, min_doc_count: 1 } },
schema_versions: { terms: { field: 'schema_version', size: 10, min_doc_count: 1 } },
link_checks_status: { terms: { field: 'landing_page.status', size: 10, 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 } },
certificates: { terms: { field: 'client.certificate', size: 10, min_doc_count: 1 } },
views: {
date_histogram: { field: 'publication_year', interval: 'year', format: 'year', order: { _key: "desc" }, min_doc_count: 1 },
aggs: {
Expand Down
4 changes: 2 additions & 2 deletions app/models/prefix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def self.query_aggregations
states: { terms: { field: 'state', size: 3, min_doc_count: 1 } },
years: { date_histogram: { field: 'created_at', interval: 'year', format: 'year', order: { _key: "desc" }, min_doc_count: 1 },
aggs: { bucket_truncate: { bucket_sort: { size: 10 } } } },
providers: { terms: { field: 'provider_ids', size: 15, min_doc_count: 1 } },
clients: { terms: { field: 'client_ids', size: 15, min_doc_count: 1 } },
providers: { terms: { field: 'provider_ids', size: 10, min_doc_count: 1 } },
clients: { terms: { field: 'client_ids', size: 10, min_doc_count: 1 } },
}
end

Expand Down

0 comments on commit fa5d935

Please sign in to comment.