trimmed whitespace for search terms.
This commit is contained in:
parent
59675a89ec
commit
ad533e3989
1 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ function getResults (input) {
|
||||||
'must': {
|
'must': {
|
||||||
'query_string': {
|
'query_string': {
|
||||||
'fields': ['channel'],
|
'fields': ['channel'],
|
||||||
'query' : getEscapedQuery(input.channel),
|
'query' : getEscapedQuery(input.channel.trim()),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -83,7 +83,7 @@ function getResults (input) {
|
||||||
};
|
};
|
||||||
const conTermName = { // Contains search term - Name
|
const conTermName = { // Contains search term - Name
|
||||||
'query_string': {
|
'query_string': {
|
||||||
'query' : '*' + getEscapedQuery(input.s) + '*',
|
'query' : '*' + getEscapedQuery(input.s.trim()) + '*',
|
||||||
'fields': [
|
'fields': [
|
||||||
'name',
|
'name',
|
||||||
],
|
],
|
||||||
|
@ -98,7 +98,7 @@ function getResults (input) {
|
||||||
'should': [
|
'should': [
|
||||||
{ // Contains search term in Author, Title, Description
|
{ // Contains search term in Author, Title, Description
|
||||||
'query_string': {
|
'query_string': {
|
||||||
'query' : '*' + getEscapedQuery(input.s) + '*',
|
'query' : '*' + getEscapedQuery(input.s.trim()) + '*',
|
||||||
'fields': [
|
'fields': [
|
||||||
'value.stream.metadata.author',
|
'value.stream.metadata.author',
|
||||||
'value.stream.metadata.title',
|
'value.stream.metadata.title',
|
||||||
|
|
Loading…
Reference in a new issue