Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Unhandled rejection Error: Incorrect HTTP method for uri [/randomindex] and method [POST], allowed: [PUT, DELETE, GET, HEAD] #5

Open
sugizo opened this issue Nov 21, 2017 · 4 comments

Comments

@sugizo
Copy link

sugizo commented Nov 21, 2017

$ npm start

[email protected] start /Users/sugizo/js/learn/express.js-elasticsearch-autocomplete
node ./bin/www

Elasticsearch INFO: 2017-11-21T03:21:53Z
Adding connection to http://localhost:9200/

Unhandled rejection Error: Incorrect HTTP method for uri [/randomindex] and method [POST], allowed: [PUT, DELETE, GET, HEAD]
at respond (/Users/sugizo/js/learn/express.js-elasticsearch-autocomplete/node_modules/elasticsearch/src/lib/transport.js:264:15)
at checkRespForFailure (/Users/sugizo/js/learn/express.js-elasticsearch-autocomplete/node_modules/elasticsearch/src/lib/transport.js:223:7)
at HttpConnector. (/Users/sugizo/js/learn/express.js-elasticsearch-autocomplete/node_modules/elasticsearch/src/lib/connectors/http.js:155:7)
at IncomingMessage.wrapper (/Users/sugizo/js/learn/express.js-elasticsearch-autocomplete/node_modules/lodash/index.js:3095:19)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

@RaananW
Copy link
Owner

RaananW commented Nov 21, 2017

What version of elasticsearch are you using?

@sugizo
Copy link
Author

sugizo commented Dec 7, 2017

elasticsearch-6.0.0

@jreyes88
Copy link

jreyes88 commented Jan 3, 2018

I am getting this issue, too, using elasticsearch-6.1.1

@RaananW
Copy link
Owner

RaananW commented Jan 4, 2018

please note, this was written (2 years ago) for elasticsearch 2. Code needs to be modified to fit the new API.
Whenever I will find the time, I will dive into the new ES API. Not in the near future thou

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants