I am implementing ft.search command using lettuce mod.
Raw query -
FT.SEARCH idx:accountproject '@siteId:[1 1] @status:{A} @premises:{ON}' RETURN 10 id accountId siteId addressAddress1 addressAddress2 addressCity addressStateProvince addressPostalCode addressCountry accountsReceivableLastOrderDate LIMIT 0 1
and it returns below response -
1) "4391"
2) "accpro:100"
3) 1) "id"
2) "100"
3) "accountId"
4) "500"
5) "siteId"
6) "1"
7) "addressAddress1"
8) "6******"
9) "addressAddress2"
10) "null"
11) "addressCity"
12) "F******"
13) "addressStateProvince"
14) "FL"
15) "addressPostalCode"
16) "33351"
17) "addressCountry"
18) "null"
While I try the same via lettuce library, then I get below response
{id=100, accountId=500, siteId=1, addressAddress1=6*****, addressAddress2=addressCity, F********=addressStateProvince, FL=addressPostalCode, 33351=addressCountry}
Here addressAddress2 has incorrect value, and the following keys.. It's happening because of mis handling of null values in lettuce decode.
Below is my redis client setup -
RedisModulesClient redisModulesClient = RedisModulesClient.create(uriBuilder.build());
redisModulesClient.setOptions(
ClientOptions.builder()
.timeoutOptions(
TimeoutOptions.builder().timeoutCommands(true).fixedTimeout(commandTimeOut).build())
.protocolVersion(ProtocolVersion.RESP2)
.socketOptions(SocketOptions.builder().connectTimeout(connectionTimeOut).build())
.build());
However once, I was able to get proper search result :
{id=100, accountId=500, siteId=1, addressAddress1=6*****, addressAddress2=null, addressCity=F******, addressStateProvince=FL, addressPostalCode=33351, addressCountry=null}
But I could not recollect whether it was intermittent or consistent, I tried multiple changes, but still no luck.
Please kindly help me in resolving this issue.