diff options
author | Eleanor Eng <eleanor_eng@brown.edu> | 2019-08-06 10:54:33 -0400 |
---|---|---|
committer | Eleanor Eng <eleanor_eng@brown.edu> | 2019-08-06 10:54:33 -0400 |
commit | b7194d88ba9733413063c7f371dedefd3a97e35f (patch) | |
tree | 418203fe1ee1f4aa0771c555ab672541cc775473 /src/client/util/SearchUtil.ts | |
parent | 2c4440be2807b3b1da691ea04b061c35e50ecb72 (diff) | |
parent | 298d1c9b29d6ce2171fd9ac8274b64583b73f6f5 (diff) |
merge with master
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) { |