I am using Aerospike C client 4.1.5 and Aerospike Server 3.7.4. While performing secondary index lookup with aerospike_query_async, MAP and List bins of record are coming as Bytes. Looks like deserialisation is not getting called.
Can you first validate that the bin is indeed stored as a Map in the database?
There are multiple ways this can be done -
- Use aql in aerospike-tools version 3.8.3 or later, see if the keyword ‘Map’ is in front of the bin value.
aql> select * from test.testset +---------+--------------------------------------------+ | a | b | +---------+--------------------------------------------+ | "abc11" | MAP('{"items":300, "of":200, "map":100}') | +---------+--------------------------------------------+
- Do a backup and see if the bin value has a ‘- M’ in front
- M b 32 g6MDb2bMyKYDaXRlbXPNASykA21hcGQ=
I found the mistake. It was related to wrong initialisation of query policy, which was leading to deserialise field set to false. Thanks.