Update index settings API

This commit is contained in:
r--w 2015-10-02 13:59:55 +02:00
parent bf0b8b5bc8
commit 8fa9ff1c53
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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,
},