aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search/SearchBox.tsx
diff options
context:
space:
mode:
authorab <abdullah_ahmed@brown.edu>2019-07-10 13:01:16 -0400
committerab <abdullah_ahmed@brown.edu>2019-07-10 13:01:16 -0400
commite3f0338f8f4b223a7e4389aebeb20ede5555510b (patch)
tree3fb181c0b16161d2c8b1d7f0a7cbcd34f8e1c3c4 /src/client/views/search/SearchBox.tsx
parent1fb746bcb228a348da1b4d8056aab59e073ee89e (diff)
parentfd8fcfe74fff78bc67b6302f917c53e69d598712 (diff)
merged
Diffstat (limited to 'src/client/views/search/SearchBox.tsx')
-rw-r--r--src/client/views/search/SearchBox.tsx15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 2582c0d94..393a5a924 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -102,20 +102,7 @@ export class SearchBox extends React.Component {
@action
getResults = async (query: string) => {
- let response = await rp.get(DocServer.prepend('/search'), {
- qs: {
- query
- }
- });
- let res: string[] = JSON.parse(response);
- const fields = await DocServer.GetRefFields(res);
- const docs: Doc[] = [];
- for (const id of res) {
- const field = fields[id];
- if (field instanceof Doc) {
- docs.push(field);
- }
- }
+ const { docs } = await SearchUtil.Search(query, true);
return FilterBox.Instance.filterDocsByType(docs);
}