-
Notifications
You must be signed in to change notification settings - Fork 234
how to add new index to old ones #632
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestfeaturegood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
So i have these indexes on the first startup:
if err := r.Repository.CreateIndex(context.Background(), func(schema om.FtCreateSchema) rueidis.Completed {
return schema.
FieldName("$.user.owner").As("owner").Tag().
FieldName("$.user.name").As("name").Tag().
Build()
}); err != nil {
logs.Warning(err)
}now I need to add a new index:
if err := r.Repository.CreateIndex(context.Background(), func(schema om.FtCreateSchema) rueidis.Completed {
return schema.
FieldName("$.user.owner").As("owner").Tag().
FieldName("$.user.name").As("name").Tag().
FieldName("$.user.id").As("id").Tag().
Build()
}); err != nil {
logs.Warning(err)
}But I get an index already exists error. I need my Redis to be persistent and can't flush everything.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfeaturegood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed