Skip to content

Commit

Permalink
update planetary facet fields
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyichen authored and thostetler committed Dec 6, 2024
1 parent de41e09 commit b9502d9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")`,
{},
],
{
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/api/search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchFacet/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const facetConfig: Record<SearchFacetID, Omit<ISearchFacetProps, 'onQuery
},
planetary: {
label: 'Planetary Features',
field: 'planetary_feature_facet' as FacetField,
field: 'planetary_feature_facet_hier_3level' as FacetField,
hasChildren: true,
logic: defaultLogic,
storeId: 'planetary',
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchFacet/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const facetFields: FacetField[] = [
'ned_object_facet_hier',
'nedtype_object_facet_hier',
'simbad_object_facet_hier',
'planetary_feature_facet',
'planetary_feature_facet_hier_3level',
];

export type SearchFacetID =
Expand Down
2 changes: 1 addition & 1 deletion src/components/__mocks__/facetCountFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const facetFoundFieldsData: IFacetCountsFields = {
vizier_facet: [],
property: [],
simbad_object_facet_hier: [],
planetary_feature_facet: [],
planetary_feature_facet_hier_3level: [],
},
facet_ranges: {},
facet_intervals: {},
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/generators/facets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const createVal = (prefix: string, id: FacetField) => {
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:
Expand Down

0 comments on commit b9502d9

Please sign in to comment.