aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/Search.ts3
-rw-r--r--src/server/index.ts3
2 files changed, 0 insertions, 6 deletions
diff --git a/src/server/Search.ts b/src/server/Search.ts
index 4a408405a..723dc101b 100644
--- a/src/server/Search.ts
+++ b/src/server/Search.ts
@@ -32,13 +32,10 @@ export class Search {
public async search(query: any) {
try {
- console.log("SEARCH " + query + " " + (this.url + "dash/select") + " " + query.q);
- console.log(query);
const searchResults = JSON.parse(await rp.get(this.url + "dash/select", {
qs: query
}));
const { docs, numFound } = searchResults.response;
- console.log("RESULTS " + numFound);
const ids = docs.map((field: any) => field.id);
return { ids, numFound, highlighting: searchResults.highlighting };
} catch {
diff --git a/src/server/index.ts b/src/server/index.ts
index 149bacf0f..50ce2b14e 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -198,15 +198,12 @@ const solrURL = "http://localhost:8983/solr/#/dash";
app.get("/search", async (req, res) => {
const solrQuery: any = {};
- console.log("GOT SEARCH");
["q", "fq", "start", "rows", "hl", "hl.fl"].forEach(key => solrQuery[key] = req.query[key]);
if (solrQuery.q === undefined) {
res.send([]);
return;
}
- console.log("CALLING SEARCH")
let results = await Search.Instance.search(solrQuery);
- console.log("RETURNING SEARCH")
res.send(results);
});