mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix: test was added
This commit is contained in:
parent
ff8bf7817a
commit
1e05c2442f
1 changed files with 17 additions and 0 deletions
|
@ -2722,4 +2722,21 @@ TEST_F(SearchFamilyTest, JsonWithNullFields) {
|
|||
AreDocIds("doc:1", "doc:2"));
|
||||
}
|
||||
|
||||
TEST_F(SearchFamilyTest, TestVectorIndexPtrValidity) {
|
||||
const uint32_t MY_UINT16_MAX = 65535;
|
||||
const uint32_t M = MY_UINT16_MAX + 1;
|
||||
const uint32_t dim = 4;
|
||||
|
||||
EXPECT_EQ(
|
||||
Run({"FT.CREATE", "idx", "SCHEMA", "n", "NUMERIC", "v", "VECTOR", "HNSW", "8", "TYPE",
|
||||
"FLOAT16", "DIM", absl::StrCat(dim), "DISTANCE_METRIC", "L2", "M", absl::StrCat(M)}),
|
||||
"OK");
|
||||
|
||||
auto res = Run({"HSET", "doc", "n", "0"});
|
||||
EXPECT_EQ(res, "1");
|
||||
|
||||
res = Run({"HSET", "doc", "n", "1"});
|
||||
EXPECT_EQ(res, "0");
|
||||
}
|
||||
|
||||
} // namespace dfly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue