-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
Description
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}
fromAS {attribute}
- if a field or alias named
type
,FieldOptions
parsing will be confusing SORTABLE
info errorNOINDEX
info missing
Cause Analysis:
-
while fixing this issue:The Info() method cannot return correct field information #141,missing identifier information
redisearch-go/redisearch/client.go
Lines 591 to 597 in 81cf501
case "attributes": for _, attr := range res[ii+1].([]interface{}) { l := len(attr.([]interface{})) schemaAttributes = append(schemaAttributes, attr.([]interface{})[3:l]) } } -
if a field or alias named
type
, this code will go wrong
redisearch-go/redisearch/client.go
Line 526 in 81cf501
switch strings.ToUpper(spec[sliceIndex(spec, "type")+1]) { -
FieldOptions
is not processed correctly and completely