Skip to content

Commit

Permalink
changes in response to review
Browse files Browse the repository at this point in the history
  • Loading branch information
Courey authored and lpsinger committed Nov 30, 2023
1 parent 34ae978 commit e2b8b4f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion app.arc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ circulars

circulars
eventId *String
name circularEventId
name circularsByEventId

circulars_subscriptions
sub *String
Expand Down
14 changes: 7 additions & 7 deletions app/routes/_gcn.synonyms/synonyms.lib.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// /*!
// * Copyright © 2023 United States Government as represented by the
// * Administrator of the National Aeronautics and Space Administration.
// * All Rights Reserved.
// *
// * SPDX-License-Identifier: Apache-2.0
// */
/*!
* Copyright © 2023 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
export interface Synonym {
eventId: string
synonymId: string
Expand Down
23 changes: 12 additions & 11 deletions sandbox-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ import { readFile } from 'fs/promises'

export default async function () {
const text = await readFile('sandbox-seed.json', { encoding: 'utf-8' })
const { circulars } = JSON.parse(text)
const { synonyms } = JSON.parse(text)
const circularResults = circulars.flatMap((item) => [
{ index: { _index: 'circulars', _id: item.circularId.toString() } },
item,
])
const groupResults = synonyms.flatMap((item) => [
{ index: { _index: 'synonyms', _id: item.id } },
item,
])
return circularResults.concat(groupResults)
const { circulars, synonyms } = JSON.parse(text)

return [
...circulars.flatMap((item) => [
{ index: { _index: 'circulars', _id: item.circularId.toString() } },
item,
]),
...synonyms.flatMap((item) => [
{ index: { _index: 'synonyms', _id: item.id } },
item,
]),
]
}

0 comments on commit e2b8b4f

Please sign in to comment.