omc / searchyll

GNU General Public License v3.0
48 stars 15 forks source link

Use PUT instead of POST #19

Closed matthewdu closed 7 years ago

matthewdu commented 7 years ago

Not sure what behaviour before Elasticsearch 5.0 was.

Now

POST /some_index
{
  "index": {
    "number_of_shards":   5,
    "number_of_replicas": 0,
    "refresh_interval":   -1
  }
}

returns

No handler found for uri [/some_index] and method [POST]

The proper http request method is PUT https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html

allizad commented 7 years ago

Thanks, @matthewdu!