Fixed - RSearch.search() method throws "Parameters must be specified in PARAM VALUE pairs" error #5106

pull/5108/head
Nikita Koksharov 2 years ago
parent 5581a0d0e5
commit cef817fe0e

@ -454,7 +454,7 @@ public class RedissonSearch implements RSearch {
}
if (!options.getParams().isEmpty()) {
args.add("PARAMS");
args.add(options.getParams().size());
args.add(options.getParams().size()*2);
for (Map.Entry<String, Object> entry : options.getParams().entrySet()) {
args.add(entry.getKey());
args.add(entry.getValue());
@ -573,7 +573,7 @@ public class RedissonSearch implements RSearch {
}
if (!options.getParams().isEmpty()) {
args.add("PARAMS");
args.add(options.getParams().size());
args.add(options.getParams().size()*2);
for (Map.Entry<String, Object> entry : options.getParams().entrySet()) {
args.add(entry.getKey());
args.add(entry.getValue());

@ -224,6 +224,7 @@ public class RedissonSearchTest extends BaseTest {
SearchResult r2 = s.search("idx", "*", QueryOptions.defaults()
.returnAttributes(new ReturnAttribute("arr"),
new ReturnAttribute("val"))
.params(Collections.singletonMap("12", "323"))
.dialect(3));
Map<String, Object> map2 = new LinkedHashMap<>();

Loading…
Cancel
Save