Skip to content

The Info() method cannot return correct field information #141

@shumin1027

Description

@shumin1027

The Info() method cannot return correct field information

RediSearch version: v2.2.5

Cause Analysis:

the fields was renamed to attributes

case "fields":
schemaFields, _ = redis.Values(res[ii+1], nil)
}

❯ redis-cli 
127.0.0.1:6379> FT.INFO test
 1) index_name
 2) test
 3) index_options
 4) (empty array)
 5) index_definition
 6) 1) key_type
    2) HASH
    3) prefixes
    4) 1) test:
    5) default_score
    6) "1"
 7) attributes
 8) 1) 1) identifier
       2) body
       3) attribute
       4) body
       5) type
       6) TEXT
       7) WEIGHT
       8) "1"
    2) 1) identifier
       2) title
       3) attribute
       4) title
       5) type
       6) TEXT
       7) WEIGHT
       8) "5"
       9) SORTABLE
    3) 1) identifier
       2) date
       3) attribute
       4) date
       5) type
       6) NUMERIC
    4) 1) identifier
       2) tags
       3) attribute
       4) tags
       5) type
       6) TAG
       7) SEPARATOR
       8) ,
 9) num_docs
10) "0"

……

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions