Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/index_schema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ void IndexSchema::RespondWithInfo(ValkeyModuleCtx *ctx) const {
ValkeyModule_ReplyWithArray(ctx, 0);

ValkeyModule_ReplyWithSimpleString(ctx, "index_definition");
ValkeyModule_ReplyWithArray(ctx, 6);
ValkeyModule_ReplyWithArray(ctx, 8);
ValkeyModule_ReplyWithSimpleString(ctx, "key_type");
ValkeyModule_ReplyWithSimpleString(ctx,
attribute_data_type_->ToString().c_str());
Expand All @@ -734,6 +734,8 @@ void IndexSchema::RespondWithInfo(ValkeyModuleCtx *ctx) const {
// supported.
ValkeyModule_ReplyWithSimpleString(ctx, "default_score");
ValkeyModule_ReplyWithCString(ctx, "1");
ValkeyModule_ReplyWithSimpleString(ctx, "indexes_all");
ValkeyModule_ReplyWithSimpleString(ctx, "false");

ValkeyModule_ReplyWithSimpleString(ctx, "attributes");
ValkeyModule_ReplyWithArray(ctx, VALKEYMODULE_POSTPONED_ARRAY_LEN);
Expand Down
34 changes: 21 additions & 13 deletions testing/ft_info_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,11 @@ INSTANTIATE_TEST_SUITE_P(
.expect_return_failure = false,
.expected_output =
"*34\r\n+index_name\r\n+test_name\r\n+index_"
"options\r\n*0\r\n+index_definition\r\n*6\r\n+key_"
"options\r\n*0\r\n+index_definition\r\n*8\r\n+key_"
"type\r\n+HASH\r\n+prefixes\r\n*1\r\n+prefix_1\r\n+"
"default_score\r\n$1\r\n1\r\n+attributes\r\n*1\r\n*"
"24\r\n+"
"default_score\r\n$1\r\n1\r\n+indexes_all\r\n+"
"false\r\n+"
"attributes\r\n*1\r\n*24\r\n+"
"identifier\r\n+test_identifier_1\r\n+"
"attribute\r\n+test_attribute_1\r\n+"
"type\r\n+VECTOR\r\n+"
Expand Down Expand Up @@ -213,10 +214,11 @@ INSTANTIATE_TEST_SUITE_P(
.expect_return_failure = false,
.expected_output =
"*34\r\n+index_name\r\n+test_name\r\n+index_"
"options\r\n*0\r\n+index_definition\r\n*6\r\n+key_"
"options\r\n*0\r\n+index_definition\r\n*8\r\n+key_"
"type\r\n+HASH\r\n+prefixes\r\n*1\r\n+prefix_1\r\n+"
"default_score\r\n$1\r\n1\r\n+attributes\r\n*1\r\n*"
"20\r\n+"
"default_score\r\n$1\r\n1\r\n+indexes_all\r\n+"
"false\r\n+"
"attributes\r\n*1\r\n*20\r\n+"
"identifier\r\n+test_identifier_1\r\n+"
"attribute\r\n+test_attribute_1\r\n+"
"type\r\n+VECTOR\r\n+"
Expand Down Expand Up @@ -281,9 +283,11 @@ INSTANTIATE_TEST_SUITE_P(
.expect_return_failure = false,
.expected_output =
"*34\r\n+index_name\r\n+test_name\r\n+index_"
"options\r\n*0\r\n+index_definition\r\n*6\r\n+key_"
"options\r\n*0\r\n+index_definition\r\n*8\r\n+key_"
"type\r\n+HASH\r\n+prefixes\r\n*1\r\n+prefix_1\r\n+"
"default_score\r\n$1\r\n1\r\n+attributes\r\n*1\r\n*"
"default_score\r\n$1\r\n1\r\n+indexes_all\r\n+"
"false\r\n+"
"attributes\r\n*1\r\n*"
"10\r\n+identifier\r\n+test_identifier_1\r\n+"
"attribute\r\n+test_attribute_1\r\n+type\r\n+"
"TAG\r\n+SEPARATOR\r\n+@\r\n+size\r\n$1\r\n0\r\n+"
Expand Down Expand Up @@ -342,9 +346,11 @@ INSTANTIATE_TEST_SUITE_P(
.expect_return_failure = false,
.expected_output =
"*34\r\n+index_name\r\n+test_name\r\n+index_"
"options\r\n*0\r\n+index_definition\r\n*6\r\n+key_"
"options\r\n*0\r\n+index_definition\r\n*8\r\n+key_"
"type\r\n+HASH\r\n+prefixes\r\n*1\r\n+prefix_1\r\n+"
"default_score\r\n$1\r\n1\r\n+attributes\r\n*1\r\n*"
"default_score\r\n$1\r\n1\r\n+indexes_all\r\n+"
"false\r\n+"
"attributes\r\n*1\r\n*"
"11\r\n+identifier\r\n+test_identifier_1\r\n+"
"attribute\r\n+test_attribute_1\r\n+type\r\n+"
"TAG\r\n+SEPARATOR\r\n+@\r\n+CASESENSITIVE\r\n+"
Expand Down Expand Up @@ -401,9 +407,11 @@ INSTANTIATE_TEST_SUITE_P(
.expect_return_failure = false,
.expected_output =
"*34\r\n+index_name\r\n+test_name\r\n+index_"
"options\r\n*0\r\n+index_definition\r\n*6\r\n+key_"
"options\r\n*0\r\n+index_definition\r\n*8\r\n+key_"
"type\r\n+HASH\r\n+prefixes\r\n*1\r\n+prefix_1\r\n+"
"default_score\r\n$1\r\n1\r\n+attributes\r\n*1\r\n*"
"default_score\r\n$1\r\n1\r\n+indexes_all\r\n+"
"false\r\n+"
"attributes\r\n*1\r\n*"
"8\r\n+identifier\r\n+test_identifier_1\r\n+"
"attribute\r\n+test_attribute_1\r\n+type\r\n+"
"NUMERIC\r\n+size\r\n$1\r\n0\r\n+num_docs\r\n:"
Expand Down Expand Up @@ -506,4 +514,4 @@ INSTANTIATE_TEST_SUITE_P(

} // namespace

} // namespace valkey_search
} // namespace valkey_search
Loading