Skip to content
Permalink
Browse files

use escaped query for query_string

removed comments
  • Loading branch information...
tiger5226 committed Mar 1, 2019
1 parent a716124 commit 4056fb86cf82230a15211452ece85c275bdf804b
Showing with 2 additions and 8 deletions.
  1. +2 −8 server/controllers/lighthouse.js
@@ -84,9 +84,7 @@ function getResults (input) {

const splitName = () => {
let queries = [];
console.log(washedQuery);
console.log(washedQuery.split(' '));
washedQuery.split(' ').forEach((term) => {
escapedQuery.split(' ').forEach((term) => {
queries.push({ // Contains search term
'query_string': {
'query' : `*${term}*`,
@@ -97,14 +95,11 @@ function getResults (input) {
},
});
});
console.log(JSON.stringify(queries));
return queries;
};
const splitATD = () => {
let queries = [];
console.log(washedQuery);
console.log(washedQuery.split(' '));
washedQuery.split(' ').forEach((term) => {
escapedQuery.split(' ').forEach((term) => {
queries.push({ // Contains search term in Author, Title, Description
'query_string': {
'query' : `*${term}*`,
@@ -117,7 +112,6 @@ function getResults (input) {
},
});
});
console.log(JSON.stringify(queries));
return queries;
};
const matPhraseName = { // Match search text as phrase - Name

0 comments on commit 4056fb8

Please sign in to comment.
You can’t perform that action at this time.