Skip to content

Commit

Permalink
Change "Fields" to "Attributes" in info function (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avital-Fine authored Apr 12, 2022
1 parent d5b6b35 commit 5c6afe8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions redisearch/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ func (i *Client) Info() (*IndexInfo, error) {
}

ret := IndexInfo{}
var schemaFields []interface{}
var schemaAttributes []interface{}
var indexOptions []string

// Iterate over the values
Expand All @@ -558,13 +558,13 @@ func (i *Client) Info() (*IndexInfo, error) {
switch key {
case "index_options":
indexOptions, _ = redis.Strings(res[ii+1], nil)
case "fields":
schemaFields, _ = redis.Values(res[ii+1], nil)
case "attributes":
schemaAttributes, _ = redis.Values(res[ii+1], nil)
}
}

if schemaFields != nil {
ret.loadSchema(schemaFields, indexOptions)
if schemaAttributes != nil {
ret.loadSchema(schemaAttributes, indexOptions)
}

return &ret, nil
Expand Down

0 comments on commit 5c6afe8

Please sign in to comment.