Update index settings API
This commit is contained in:
parent
bf0b8b5bc8
commit
8fa9ff1c53
2
goes.go
2
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
|
// 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
|
// 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{
|
r := Request{
|
||||||
Conn: c,
|
Conn: c,
|
||||||
Query: settings,
|
Query: settings,
|
||||||
|
@ -187,7 +187,7 @@ func (s *GoesTestSuite) TestUpdateIndexSettings(c *C) {
|
|||||||
_, err := conn.CreateIndex(indexName, map[string]interface{}{})
|
_, err := conn.CreateIndex(indexName, map[string]interface{}{})
|
||||||
c.Assert(err, IsNil)
|
c.Assert(err, IsNil)
|
||||||
|
|
||||||
_, err := conn.UpdateIndexSettings(indexName, map[string]interface{}{
|
_, err = conn.UpdateIndexSettings(indexName, map[string]interface{}{
|
||||||
"index": map[string]interface{}{
|
"index": map[string]interface{}{
|
||||||
"number_of_replicas": 0,
|
"number_of_replicas": 0,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user