Skip to content

Commit

Permalink
Support multiple options in FT.AlterIndex (#655)
Browse files Browse the repository at this point in the history
Signed-off-by: Vatsal <[email protected]>
  • Loading branch information
imvtsl authored Oct 26, 2024
1 parent b743fe0 commit 6b95467
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion hack/cmds/commands_search.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@
},
{
"name": "options",
"type": "string"
"type": "string",
"multiple": true
}
],
"since": "1.0.0",
Expand Down
9 changes: 7 additions & 2 deletions internal/cmds/gen_search.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/cmds/gen_search_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion om/hash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func TestNewHashRepository(t *testing.T) {
}
err = repo.AlterIndex(ctx, func(alter FtAlterIndex) rueidis.Completed {
return alter.
Schema().Add().Field("JSON").Options("TEXT").
Schema().Add().Field("JSON").Options("TEXT", "SORTABLE").
Build()
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion om/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func TestNewJSONRepository(t *testing.T) {
}
err = repo.AlterIndex(ctx, func(alter FtAlterIndex) rueidis.Completed {
return alter.
Schema().Add().Field("$.Nested.F1").Options("TEXT").
Schema().Add().Field("$.Nested.F1").Options("TEXT", "SORTABLE").
Build()
})
if err != nil {
Expand Down

0 comments on commit 6b95467

Please sign in to comment.