spullara / redis-protocol

Java client and server implementation of Redis
356 stars 134 forks source link

HMGET.asStringList returns less answers than requested #30

Open kalondar opened 11 years ago

kalondar commented 11 years ago

Redis "struct" HASH content: "field1" = "1" // "field2" is missing

Java code:

List<String> rec = client.hmget("struct", "field1", "field2").asStringList(Charsets.UTF_8);

Returns only one String... but you don't know which one :( It makes HMGET function useless, because you can't match requested field with returned values.

Only one workaround is to analyse MultiBulkReply.data[] and manually match fields by request index.