Skip to content

Commit ffdec7e

Browse files
Bump version to module 1.2 and add check for GetMinVersion (#790)
Bump version to module 1.2 and add check for GetMinVersion to return 1.2 if there is any text field Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
1 parent a876eed commit ffdec7e

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

src/index_schema.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,16 @@ absl::StatusOr<vmsdk::ValkeyVersion> IndexSchema::GetMinVersion(
19511951
"Unable to unpack metadata for index schema fingerprint "
19521952
"calculation");
19531953
}
1954-
if (unpacked->has_db_num() && unpacked->db_num() != 0) {
1954+
bool has_text_index = false;
1955+
for (const auto &attr : unpacked->attributes()) {
1956+
if (attr.index().has_text_index()) {
1957+
has_text_index = true;
1958+
break;
1959+
}
1960+
}
1961+
if (has_text_index) {
1962+
return kRelease12;
1963+
} else if (unpacked->has_db_num() && unpacked->db_num() != 0) {
19551964
return kRelease11;
19561965
} else {
19571966
return kRelease10;

src/version.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//
1414
// Set the module version to the current release
1515
//
16-
constexpr auto kModuleVersion = vmsdk::ValkeyVersion(1, 1, 0);
16+
constexpr auto kModuleVersion = vmsdk::ValkeyVersion(1, 2, 0);
1717

1818
/* The release stage is used in order to provide release status information.
1919
* In unstable branch the status is always "dev".
@@ -89,10 +89,15 @@ needed.
8989
constexpr vmsdk::ValkeyVersion kRelease10(1, 0, 0);
9090

9191
//
92-
// Release 1.0, added support for cluster mode with non-zero DB numbers
92+
// Release 1.1, added support for cluster mode with non-zero DB numbers
9393
//
9494
constexpr vmsdk::ValkeyVersion kRelease11(1, 1, 0);
9595

96+
//
97+
// Release 1.2, added support for full text search.
98+
//
99+
constexpr vmsdk::ValkeyVersion kRelease12(1, 2, 0);
100+
96101
} // namespace valkey_search
97102

98103
#endif

0 commit comments

Comments
 (0)