now only return feilds needed in application,
Wildcard searches added to allow partial matches.
This commit is contained in:
parent
66fcf4c833
commit
40a5ef384a
3 changed files with 6 additions and 5 deletions
File diff suppressed because one or more lines are too long
|
@ -1,2 +1,2 @@
|
|||
export const port = process.env.PORT || 3000;
|
||||
export const port = process.env.PORT || 80;
|
||||
export const baseApi = 'api';
|
||||
|
|
|
@ -21,12 +21,13 @@ function getResults(input) {
|
|||
if(input.from == undefined) input.from = 0;
|
||||
return eclient.search({
|
||||
index: "claims",
|
||||
_source: ["name", "value", "claimId"],
|
||||
body: {
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": {
|
||||
"query_string": {
|
||||
"query": input.s.trim(),
|
||||
"query": '*' + input.s.trim() + '*',
|
||||
"fields": [
|
||||
"name",
|
||||
"value.stream.metadata.author",
|
||||
|
@ -54,7 +55,7 @@ function getAutoComplete(input) {
|
|||
"bool": {
|
||||
"must": {
|
||||
"query_string": {
|
||||
"query": input.s.trim(),
|
||||
"query": "*" + input.s.trim() + "*",
|
||||
"fields": [
|
||||
"name",
|
||||
"value.stream.metadata.title",
|
||||
|
@ -138,4 +139,4 @@ class LighthouseControllers {
|
|||
/* eslint-enable no-param-reassign */
|
||||
}
|
||||
|
||||
export default new LighthouseControllers();
|
||||
export default new LighthouseControllers();
|
||||
|
|
Loading…
Add table
Reference in a new issue