Closed BagritsevichStepan closed 1 week ago
@romange I've added more tests. After adding support for nullable values, a more tests will be added. Please take a look at the PR.
I found several new bugs and fixed them in the latest commit:
Bug:
JSON.SET j1 . '{"data":1}'
JSON.SET j2 . '{"data":"1"}'
FT.CREATE i1 ON JSON SCHEMA $.data AS data NUMERIC
FT.CREATE i2 ON JSON SCHEMA $.data AS data TEXT
FT.SEARCH i1 "*"
and FT.SEARCH i2 "*"
both return j1 and j2. However, it should return j1 for i1 and j2 for i2. This happens because we are parsing string and numeric fields in the same way in the DocumentAccessor
.
Bug related to how we parse FtVector
in the GetVector
function in DocumentAccessor
.
Bug was crash during JsonAccessor::GetVector
when the field type is not an array
I’ve also added more tests
Found and fixed another bug:
We should support queries like this:
JSON.SET j1 . '{"data":["first value", "second_value"]}'
FT.CREATE index ON JSON SCHEMA $.data AS data TEXT
FT.SEARCH index "*"
should return j1
fixes dragonflydb#3986