Error 405 (Method Not Allowed) when trying to connect to ElasticSearch 7 using React-SearchKit Error 405 (Method Not Allowed) when trying to connect to ElasticSearch 7 using React-SearchKit elasticsearch elasticsearch

Error 405 (Method Not Allowed) when trying to connect to ElasticSearch 7 using React-SearchKit


Assuming http://localhost:9200 is your ES-Node, the correct search endpoints in Elasticsearch are:

  1. http://localhost:9200/_search if you want to search all indices
  2. http://localhost:9200/foo/_search if you want to search the foo index
  3. http://localhost:9200/foo,bar/_search if you want to search both indices, foo and bar
  4. http://localhost:9200/data*/_search if you want to search all indices starting with data

You are missing the _ (underscore).

Here is the related documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html