diff options
| author | bob <bcz@cs.brown.edu> | 2019-07-19 14:43:26 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-07-19 14:43:26 -0400 |
| commit | 89b2500e71e4d167c7ae179c3eb2b5052b128ad0 (patch) | |
| tree | 8b243d52a47024b06d9941134d56c4e25f80d930 /src/client/util/SearchUtil.ts | |
| parent | ae07ba8fb410752ea98702219247ce5f89d1758b (diff) | |
| parent | 8854d3277541a67aef4187b5d3592bea5a7fcfa2 (diff) | |
Merge branch 'master' into stackingSections
Diffstat (limited to 'src/client/util/SearchUtil.ts')
| -rw-r--r-- | src/client/util/SearchUtil.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/util/SearchUtil.ts b/src/client/util/SearchUtil.ts index abf1a7c32..ee5a83710 100644 --- a/src/client/util/SearchUtil.ts +++ b/src/client/util/SearchUtil.ts @@ -2,6 +2,7 @@ import * as rp from 'request-promise'; import { DocServer } from '../DocServer'; import { Doc } from '../../new_fields/Doc'; import { Id } from '../../new_fields/FieldSymbols'; +import { Utils } from '../../Utils'; export namespace SearchUtil { export type HighlightingResult = { [id: string]: { [key: string]: string[] } }; @@ -29,7 +30,7 @@ export namespace SearchUtil { export function Search(query: string, returnDocs: false, options?: SearchParams): Promise<IdSearchResult>; export async function Search(query: string, returnDocs: boolean, options: SearchParams = {}) { query = query || "*"; //If we just have a filter query, search for * as the query - const result: IdSearchResult = JSON.parse(await rp.get(DocServer.prepend("/search"), { + const result: IdSearchResult = JSON.parse(await rp.get(Utils.prepend("/search"), { qs: { ...options, q: query }, })); if (!returnDocs) { |
