appbaseio / appbaseio/reactivecore

Error on response after modifying request API from _msearch to _search

Aperta
#47 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
33
Fork
27
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Affected Projects**: Reactivesearch / ReactiveCore

**Library Version:** 3.0.1

**Describe the bug**
Using the [Reactivesearch documentation as a baseline](https://docs.appbase.io/docs/reactivesearch/v3/overview/reactivebase/), I changed the request API endpoint as follow:
![image](https://user-images.githubusercontent.com/26316855/64986871-512f5680-d89e-11e9-8377-4c852cea9528.png)
The request was processed nicely by Elasticsearch. However, the following error was thrown while the library was processing the response:
![image](https://user-images.githubusercontent.com/26316855/64986757-1decc780-d89e-11e9-91c7-31b6656ece68.png)
As I checked, the problem is that the **handleResponse** method tries to directly access a "responses" property from the body, and the search API doesn't return an array of responses - it returns a single response.
![image](https://user-images.githubusercontent.com/26316855/64987416-7e303900-d89f-11e9-99b9-ffeea410257e.png)

**To Reproduce**
Steps to reproduce the behavior:
Just modify any request using **transformRequest** as described above.

**Expected behavior**
The single response from the **_search** API should be processed succesfully.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.