Skip to content

The Info() method missing FieldOptions info #171

@shumin1027

Description

@shumin1027

RediSearch version: v2.2.10

The Info() method missing important FieldOptions info
Ref: https://redis.io/commands/ft.create/#field-options
for example:

  • cannot return correct AS {attribute} alias, and unable to distinguish {identifier} from AS {attribute}
  • if a field or alias named type,FieldOptions parsing will be confusing
  • SORTABLE info error
  • NOINDEX info missing

Cause Analysis:

  1. while fixing this issue:The Info() method cannot return correct field information #141,missing identifier information

    case "attributes":
    for _, attr := range res[ii+1].([]interface{}) {
    l := len(attr.([]interface{}))
    schemaAttributes = append(schemaAttributes, attr.([]interface{})[3:l])
    }
    }

  2. if a field or alias named type, this code will go wrong

    switch strings.ToUpper(spec[sliceIndex(spec, "type")+1]) {

  3. FieldOptions is not processed correctly and completely

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions