-
Notifications
You must be signed in to change notification settings - Fork 724
Closed as not planned
Closed as not planned
Copy link
Labels
Description
We have an integration that we created using the Elasticsearch library.
In this integration; I am using a function in which I send a body to the location with type "_doc" in the "elastic-search" directory on the server and perform a search.
When I used the function as below, hits object was returned in response, but now hits object is not returned in response.body.
const body = {"from":0,"size":"10","query":{"bool":{"must":[{"match":{"appname":"mobilepos"}},{"match":{"userid":"111401336"}},{"match":{"timestamp":"2023-01-10”}},{“match":{"hotelrefno":"999984"}}]}}}
search: (body, requestInfo) => {
return client.search({index: “elastic-search”, type: “_doc”, body: body})
.then(response => {
others.successMessage(requestInfo);
return {
status: response.statusCode,
total: response.body.hits.total.value,
data: response.body.hits.hits
};
})
.catch(error => {
return others.errorHandling(error, requestInfo);
});
}
There is no hits object in the response returned from above
@elastic/elasticsearch - npmver: 7.13.3
Could you please help me? why, what should I edit or check?
lllleonnnn