diff --git a/goes.go b/goes.go index 6f16b0e..f15000f 100644 --- a/goes.go +++ b/goes.go @@ -77,7 +77,7 @@ func (c *Connection) RefreshIndex(name string) (*Response, error) { // UpdateIndexSettings updates settings for existing index represented by a name and a settings // as described here: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html -func (c *Connection) UpdateIndexSettings(name string, settings map[string]interface{}) (Response, error) { +func (c *Connection) UpdateIndexSettings(name string, settings interface{}) (*Response, error) { r := Request{ Conn: c, Query: settings, diff --git a/goes_test.go b/goes_test.go index 89bad3e..fab8df7 100644 --- a/goes_test.go +++ b/goes_test.go @@ -187,7 +187,7 @@ func (s *GoesTestSuite) TestUpdateIndexSettings(c *C) { _, err := conn.CreateIndex(indexName, map[string]interface{}{}) c.Assert(err, IsNil) - _, err := conn.UpdateIndexSettings(indexName, map[string]interface{}{ + _, err = conn.UpdateIndexSettings(indexName, map[string]interface{}{ "index": map[string]interface{}{ "number_of_replicas": 0, },