From b9502d923336685d4bccc666794eaf8e56fef177 Mon Sep 17 00:00:00 2001 From: Jennifer Chen Date: Fri, 6 Dec 2024 13:17:26 -0800 Subject: [PATCH] update planetary facet fields --- src/__tests__/utils.test.ts | 4 ++-- src/api/search/types.ts | 2 +- src/components/SearchFacet/config.ts | 2 +- src/components/SearchFacet/types.ts | 2 +- src/components/__mocks__/facetCountFields.ts | 2 +- src/mocks/generators/facets.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/__tests__/utils.test.ts b/src/__tests__/utils.test.ts index 52c9bf375..db3a22bd9 100644 --- a/src/__tests__/utils.test.ts +++ b/src/__tests__/utils.test.ts @@ -163,7 +163,7 @@ describe('parseQueryFromUrl', () => { [ 'Case with long set of query params, including all FQs', [ - `${baseUrl}?n=100&q=star&sort=score+desc%2Cdate+desc&p=1&fq_property=(property%3A"refereed")&fq_data=(data_facet%3A"NED")&fq_bibstem=(bibstem_facet%3A"A\\%26A"+AND+bibstem_facet%3A"AJ"+AND+bibstem_facet%3A"ApJL"+AND+bibstem_facet%3A"Ap\\%26SS"+AND+bibstem_facet%3A"PASP")&fq_database=(database%3A"earthscience")&fq_author=(author_facet_hier%3A"0\\%2FWang%2C+J"+AND+author_facet_hier%3A"0\\%2FWang%2C+Y"+AND+author_facet_hier%3A"0\\%2FHenning%2C+T"+AND+author_facet_hier%3A"0\\%2FZhang%2C+Y"+AND+author_facet_hier%3A"0\\%2FChen%2C+Y")&fq_aff=(aff_facet_hier%3A"0\\%2FMax+Planck")&fq_bibgroup=(bibgroup_facet%3A"ESO\\%2FTelescopes")&fq_simbad=(simbad_object_facet_hier%3A"0\\%2FStar")&fq_ned=(ned_object_facet_hier%3A"0\\%2FGalaxy")&fq_vizier=(vizier_facet%3A"Optical")&fq_doctype=(doctype_facet_hier%3A"0\\%2FArticle")&fq={!type%3Daqp+v%3D%24fq_property}%2C{!type%3Daqp+v%3D%24fq_data}%2C{!type%3Daqp+v%3D%24fq_bibstem}%2C{!type%3Daqp+v%3D%24fq_database}%2C{!type%3Daqp+v%3D%24fq_author}%2C{!type%3Daqp+v%3D%24fq_aff}%2C{!type%3Daqp+v%3D%24fq_bibgroup}%2C{!type%3Daqp+v%3D%24fq_simbad}%2C{!type%3Daqp+v%3D%24fq_ned}%2C{!type%3Daqp+v%3D%24fq_vizier}%2C{!type%3Daqp+v%3D%24fq_doctype}%2C{!type%3Daqp+v%3D%24fq_planetary_feature}&fq_planetary_feature=(planetary_feature_facet%3A"0\\%2FMars")`, + `${baseUrl}?n=100&q=star&sort=score+desc%2Cdate+desc&p=1&fq_property=(property%3A"refereed")&fq_data=(data_facet%3A"NED")&fq_bibstem=(bibstem_facet%3A"A\\%26A"+AND+bibstem_facet%3A"AJ"+AND+bibstem_facet%3A"ApJL"+AND+bibstem_facet%3A"Ap\\%26SS"+AND+bibstem_facet%3A"PASP")&fq_database=(database%3A"earthscience")&fq_author=(author_facet_hier%3A"0\\%2FWang%2C+J"+AND+author_facet_hier%3A"0\\%2FWang%2C+Y"+AND+author_facet_hier%3A"0\\%2FHenning%2C+T"+AND+author_facet_hier%3A"0\\%2FZhang%2C+Y"+AND+author_facet_hier%3A"0\\%2FChen%2C+Y")&fq_aff=(aff_facet_hier%3A"0\\%2FMax+Planck")&fq_bibgroup=(bibgroup_facet%3A"ESO\\%2FTelescopes")&fq_simbad=(simbad_object_facet_hier%3A"0\\%2FStar")&fq_ned=(ned_object_facet_hier%3A"0\\%2FGalaxy")&fq_vizier=(vizier_facet%3A"Optical")&fq_doctype=(doctype_facet_hier%3A"0\\%2FArticle")&fq={!type%3Daqp+v%3D%24fq_property}%2C{!type%3Daqp+v%3D%24fq_data}%2C{!type%3Daqp+v%3D%24fq_bibstem}%2C{!type%3Daqp+v%3D%24fq_database}%2C{!type%3Daqp+v%3D%24fq_author}%2C{!type%3Daqp+v%3D%24fq_aff}%2C{!type%3Daqp+v%3D%24fq_bibgroup}%2C{!type%3Daqp+v%3D%24fq_simbad}%2C{!type%3Daqp+v%3D%24fq_ned}%2C{!type%3Daqp+v%3D%24fq_vizier}%2C{!type%3Daqp+v%3D%24fq_doctype}%2C{!type%3Daqp+v%3D%24fq_planetary_feature}&fq_planetary_feature=(planetary_feature_facet_hier_3level%3A"0\\%2FMars")`, {}, ], { @@ -198,7 +198,7 @@ describe('parseQueryFromUrl', () => { fq_ned: '(ned_object_facet_hier:"0\\/Galaxy")', fq_vizier: '(vizier_facet:"Optical")', fq_doctype: '(doctype_facet_hier:"0\\/Article")', - fq_planetary_feature: '(planetary_feature_facet:"0\\/Mars")', + fq_planetary_feature: '(planetary_feature_facet_hier_3level:"0\\/Mars")', q: 'star', sort: ['score desc', 'date desc'], p: 1, diff --git a/src/api/search/types.ts b/src/api/search/types.ts index ece45410d..3853834cf 100644 --- a/src/api/search/types.ts +++ b/src/api/search/types.ts @@ -117,7 +117,7 @@ export type FacetField = | 'ned_object_facet_hier' | 'nedtype_object_facet_hier' | 'simbad_object_facet_hier' - | 'planetary_feature_facet'; + | 'planetary_feature_facet_hier_3level'; export interface IFacetCountsFields { facet_queries: unknown; diff --git a/src/components/SearchFacet/config.ts b/src/components/SearchFacet/config.ts index c14630e42..7b081a324 100644 --- a/src/components/SearchFacet/config.ts +++ b/src/components/SearchFacet/config.ts @@ -101,7 +101,7 @@ export const facetConfig: Record { case 'doctype_facet_hier': case 'simbad_object_facet_hier': case 'ned_object_facet_hier': - case 'planetary_feature_facet': + case 'planetary_feature_facet_hier_3level': return `${prefix}${faker.lorem.words(2)}`; default: