From c5e67b705ca2d5a9dd33a6b65416847e995b84b7 Mon Sep 17 00:00:00 2001 From: Sarala Wimalaratne Date: Fri, 24 Apr 2020 17:22:04 +0100 Subject: [PATCH 1/2] Facets limited to 10 --- app/models/doi.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/doi.rb b/app/models/doi.rb index fc0a744d8..fe814f496 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -561,12 +561,12 @@ 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" } }, @@ -574,7 +574,7 @@ def self.query_aggregations # 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: { From 4f3556276d5de5b620774d370966d920c63b758d Mon Sep 17 00:00:00 2001 From: Sarala Wimalaratne Date: Fri, 24 Apr 2020 17:32:24 +0100 Subject: [PATCH 2/2] facets in clients and prefixes changed to 10 --- app/models/client.rb | 12 ++++++------ app/models/prefix.rb | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/models/client.rb b/app/models/client.rb index cd9ff0a4a..f48e5c290 100644 --- a/app/models/client.rb +++ b/app/models/client.rb @@ -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 diff --git a/app/models/prefix.rb b/app/models/prefix.rb index bdc7b9411..932823f00 100644 --- a/app/models/prefix.rb +++ b/app/models/prefix.rb @@ -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