diff --git a/app/routes/circulars._archive._index/LuceneMenu.tsx b/app/routes/circulars._archive._index/LuceneMenu.tsx new file mode 100644 index 000000000..c5c6e6485 --- /dev/null +++ b/app/routes/circulars._archive._index/LuceneMenu.tsx @@ -0,0 +1,35 @@ +/*! + * 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 + */ +import { Link } from '@remix-run/react' + +import { CopyableCode } from '~/components/CopyableCode' + +export function LuceneAccordion() { + return ( +
+ Advanced Search +

+ To narrow the search results, use Lucene search syntax. This allows for + specifying which circular field to search (submitter, subject, and/or + body). Further documentation can be found{' '} + + here + + {'. '} +

+

Lucene Examples (click to copy):

+
+ +
+ +
+ +
+
+ ) +} diff --git a/app/routes/circulars._archive._index/route.tsx b/app/routes/circulars._archive._index/route.tsx index 73bc29d28..c4a3da84b 100644 --- a/app/routes/circulars._archive._index/route.tsx +++ b/app/routes/circulars._archive._index/route.tsx @@ -18,9 +18,21 @@ import { Alert, Button, Icon, Label, TextInput } from '@trussworks/react-uswds' import clamp from 'lodash/clamp' import { useId, useState } from 'react' +import { + circularRedirect, + createChangeRequest, + get, + getChangeRequest, + getChangeRequests, + moderatorGroup, + put, + putVersion, + search, +} from '../circulars/circulars.server' import CircularsHeader from './CircularsHeader' import CircularsIndex from './CircularsIndex' import { DateSelector } from './DateSelectorMenu' +import { LuceneAccordion } from './LuceneMenu' import { SortSelector } from './SortSelectorButton' import SynonymGroupIndex from './SynonymGroupIndex' import Hint from '~/components/Hint' @@ -36,17 +48,6 @@ import { type CircularMetadata, circularFormats, } from '~/routes/circulars/circulars.lib' -import { - circularRedirect, - createChangeRequest, - get, - getChangeRequest, - getChangeRequests, - moderatorGroup, - put, - putVersion, - search, -} from '~/routes/circulars/circulars.server' import type { SynonymGroupWithMembers } from '~/routes/synonyms/synonyms.lib' import { groupMembersByEventId } from '~/routes/synonyms/synonyms.server' @@ -319,6 +320,7 @@ export default function () { To navigate to a specific circular, enter the associated Circular ID (e.g. 'gcn123', 'Circular 123', or '123'). + {useFeature('CIRCULARS_LUCENE') && } {clean && ( <> {isGroupView ? (