aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/Search.ts26
-rw-r--r--src/server/index.ts3
2 files changed, 0 insertions, 29 deletions
diff --git a/src/server/Search.ts b/src/server/Search.ts
index 4911edd1d..59bdd4803 100644
--- a/src/server/Search.ts
+++ b/src/server/Search.ts
@@ -5,34 +5,8 @@ import { thisExpression } from 'babel-types';
export class Search {
public static Instance = new Search();
private url = 'http://localhost:8983/solr/';
- private client: any;
-
- constructor() {
- console.log("Search Instantiated!");
- var SolrNode = require('solr-node');
- this.client = new SolrNode({
- host: 'localhost',
- port: '8983',
- core: 'dash',
- protocol: 'http'
- });
- var strQuery = this.client.query().q('text:test');
-
- console.log(strQuery);
-
- // Search documents using strQuery
- // client.search(strQuery, (err: any, result: any) => {
- // if (err) {
- // console.log(err);
- // return;
- // }
- // console.log('Response:', result.response);
- // });
- }
-
public async updateDocument(document: any) {
- console.log("UPDATE: ", JSON.stringify(document));
return rp.post(this.url + "dash/update", {
headers: { 'content-type': 'application/json' },
body: JSON.stringify([document])
diff --git a/src/server/index.ts b/src/server/index.ts
index 6b92e8e8e..44251de3d 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -308,7 +308,6 @@ function UpdateField(socket: Socket, diff: Diff) {
return;
}
const update: any = { id: diff.id };
- console.log("FIELD: ", docfield);
let dynfield = false;
for (let key in docfield) {
if (!key.startsWith("fields.")) continue;
@@ -322,14 +321,12 @@ function UpdateField(socket: Socket, diff: Diff) {
}
}
if (dynfield) {
- console.log("dynamic field detected!");
Search.Instance.updateDocument(update);
}
}
function CreateField(newValue: any) {
Database.Instance.insert(newValue, "newDocuments");
- console.log("created field");
}
server.listen(serverPort);