diff options
Diffstat (limited to 'src/server/Search.ts')
| -rw-r--r-- | src/server/Search.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/Search.ts b/src/server/Search.ts index 2b59c14b1..21064e520 100644 --- a/src/server/Search.ts +++ b/src/server/Search.ts @@ -1,4 +1,5 @@ import * as rp from 'request-promise'; +import { red } from 'colors'; const pathTo = (relative: string) => `http://localhost:8983/solr/dash/${relative}`; @@ -43,7 +44,7 @@ export namespace Search { export async function clear() { try { - return rp.post(pathTo("update"), { + await rp.post(pathTo("update"), { body: { delete: { query: "*:*" @@ -51,7 +52,10 @@ export namespace Search { }, json: true }); - } catch { } + } catch (e) { + console.log(red("Unable to clear search...")); + console.log(red(e.message)); + } } export async function deleteDocuments(docs: string[]) { |
