From fe7d92c3a693faaabca3ddbb6d30477241079aef Mon Sep 17 00:00:00 2001
From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
Date: Sun, 14 Nov 2021 11:58:48 +0600
Subject: [PATCH] RediSearch commands implementation (continued) and tests
---
pom.xml | 5 +
.../redis/clients/jedis/BuilderFactory.java | 34 +
.../redis/clients/jedis/CommandArguments.java | 2 +-
.../jedis/RedisClusterCommandObjects.java | 109 +-
.../clients/jedis/RedisCommandObjects.java | 70 +-
.../redis/clients/jedis/UnifiedJedis.java | 47 +-
.../jedis/commands/MiscellaneousCommands.java | 2 +
.../redis/clients/jedis/search/Query.java | 54 +-
.../jedis/search/RediSearchCommands.java | 10 +
.../clients/jedis/search/RediSearchUtil.java | 36 +
.../clients/jedis/search/SearchProtocol.java | 7 +-
.../clients/jedis/search/aggr/Reducers.java | 122 ++
....java => RedisModuleCommandsTestBase.java} | 13 +-
.../jedis/tests/modules/json/JsonTest.java | 8 +-
.../search/AggregationBuilderTest.java | 244 +++
.../tests/modules/search/CreateTest.java | 70 +
.../tests/modules/search/DocumentTest.java | 45 +
.../tests/modules/search/JsonSearchTest.java | 225 +++
.../jedis/tests/modules/search/QueryTest.java | 156 ++
.../tests/modules/search/SchemaTest.java | 34 +
.../tests/modules/search/SearchTest.java | 1381 +++++++++++++++++
21 files changed, 2610 insertions(+), 64 deletions(-)
create mode 100644 src/main/java/redis/clients/jedis/search/RediSearchUtil.java
create mode 100644 src/main/java/redis/clients/jedis/search/aggr/Reducers.java
rename src/test/java/redis/clients/jedis/tests/modules/{ModuleCommandsTestBase.java => RedisModuleCommandsTestBase.java} (85%)
create mode 100644 src/test/java/redis/clients/jedis/tests/modules/search/AggregationBuilderTest.java
create mode 100644 src/test/java/redis/clients/jedis/tests/modules/search/CreateTest.java
create mode 100644 src/test/java/redis/clients/jedis/tests/modules/search/DocumentTest.java
create mode 100644 src/test/java/redis/clients/jedis/tests/modules/search/JsonSearchTest.java
create mode 100644 src/test/java/redis/clients/jedis/tests/modules/search/QueryTest.java
create mode 100644 src/test/java/redis/clients/jedis/tests/modules/search/SchemaTest.java
create mode 100644 src/test/java/redis/clients/jedis/tests/modules/search/SearchTest.java
diff --git a/pom.xml b/pom.xml
index 45114e86f4..33f273dea4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,6 +66,11 @@
gson
2.8.8
+
+ org.json
+ json
+ 20210307
+
junit
diff --git a/src/main/java/redis/clients/jedis/BuilderFactory.java b/src/main/java/redis/clients/jedis/BuilderFactory.java
index 791504014c..25281c8ac7 100644
--- a/src/main/java/redis/clients/jedis/BuilderFactory.java
+++ b/src/main/java/redis/clients/jedis/BuilderFactory.java
@@ -61,6 +61,19 @@ public String toString() {
}
};
+ public static final Builder