From a07d87da5a81444e25df76a1f238790ff01394f5 Mon Sep 17 00:00:00 2001 From: Avital-Fine Date: Fri, 8 Apr 2022 11:40:10 +0300 Subject: [PATCH] Change Fields to Attributes in info function --- redisearch/client.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/redisearch/client.go b/redisearch/client.go index f7601a7..7d3a77c 100644 --- a/redisearch/client.go +++ b/redisearch/client.go @@ -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 @@ -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