You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During our migration tests to dragonflydb we came across a quite dangerous silent error which is quite hard to spot as incomplete result.
In short: The lua-script output of FT.SEARCH is cut off and therefore different from the normal FT.SEARCH output.
This could lead to potentially dangerous scenarios where users rely on the output to be correct which it is not.
Steps to reproduce:
-Create test data index: FT.CREATE idx:testindex ON JSON PREFIX 1 testindex: SCHEMA $.pk AS pk TAG $.color AS color TAG
CodeToFreedom
changed the title
FT.SEARCH gives incomplete result when used with EVAL (Silent error + potentially dangerous)
FT.SEARCH gives incomplete result when used with EVAL (Silent error, potentially hard to spot, but hopefully easy to fix)
Sep 13, 2024
During our migration tests to dragonflydb we came across a quite dangerous silent error which is quite hard to spot as incomplete result.
In short: The lua-script output of FT.SEARCH is cut off and therefore different from the normal FT.SEARCH output.
This could lead to potentially dangerous scenarios where users rely on the output to be correct which it is not.
Steps to reproduce:
-Create test data index:
FT.CREATE idx:testindex ON JSON PREFIX 1 testindex: SCHEMA $.pk AS pk TAG $.color AS color TAG
-Insert test data:
Without EVAL/lua the FT.SEARCH command gives the correct result in dragonflydb + redis:
Wrong output format and incomplete result:
The same command via EVAL/lua script is incorrect in dragonflydb though:
Expected result (equal to redis and regular df FT.SEARCH command):
The lua script result should be the exact same output that the FT.SEARCH command above gives.
Here the correct output of redis instance:
Dragonfly version used: Most recent version [v1.22.1]
Please let me know in case something is unclear and I try to help as good as possible.
Many thanks for your efforts.
The text was updated successfully, but these errors were encountered: