Skip to content

Commit

Permalink
Pipeline RediSearch Suggestion commands
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Jun 19, 2022
1 parent 645f199 commit 0710e5c
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 3 deletions.
40 changes: 40 additions & 0 deletions src/main/java/redis/clients/jedis/MultiNodePipelineBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -3405,6 +3405,46 @@ public Response<String> ftConfigSet(String option, String value) {
public Response<String> ftConfigSet(String indexName, String option, String value) {
return appendCommand(commandObjects.ftConfigSet(indexName, option, value));
}

@Override
public Response<Long> ftSugAdd(String key, String string, double score) {
return appendCommand(commandObjects.ftSugAdd(key, string, score));
}

@Override
public Response<Long> ftSugAddIncr(String key, String string, double score) {
return appendCommand(commandObjects.ftSugAddIncr(key, string, score));
}

@Override
public Response<List<String>> ftSugGet(String key, String prefix) {
return appendCommand(commandObjects.ftSugGet(key, prefix));
}

@Override
public Response<List<String>> ftSugGet(String key, String prefix, boolean fuzzy, int max) {
return appendCommand(commandObjects.ftSugGet(key, prefix, fuzzy, max));
}

@Override
public Response<List<Tuple>> ftSugGetWithScores(String key, String prefix) {
return appendCommand(commandObjects.ftSugGetWithScores(key, prefix));
}

@Override
public Response<List<Tuple>> ftSugGetWithScores(String key, String prefix, boolean fuzzy, int max) {
return appendCommand(commandObjects.ftSugGetWithScores(key, prefix, fuzzy, max));
}

@Override
public Response<Boolean> ftSugDel(String key, String string) {
return appendCommand(commandObjects.ftSugDel(key, string));
}

@Override
public Response<Long> ftSugLen(String key) {
return appendCommand(commandObjects.ftSugLen(key));
}
// RediSearch commands

// RedisJSON commands
Expand Down
40 changes: 40 additions & 0 deletions src/main/java/redis/clients/jedis/Pipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -3412,6 +3412,46 @@ public Response<String> ftConfigSet(String option, String value) {
public Response<String> ftConfigSet(String indexName, String option, String value) {
return appendCommand(commandObjects.ftConfigSet(indexName, option, value));
}

@Override
public Response<Long> ftSugAdd(String key, String string, double score) {
return appendCommand(commandObjects.ftSugAdd(key, string, score));
}

@Override
public Response<Long> ftSugAddIncr(String key, String string, double score) {
return appendCommand(commandObjects.ftSugAddIncr(key, string, score));
}

@Override
public Response<List<String>> ftSugGet(String key, String prefix) {
return appendCommand(commandObjects.ftSugGet(key, prefix));
}

@Override
public Response<List<String>> ftSugGet(String key, String prefix, boolean fuzzy, int max) {
return appendCommand(commandObjects.ftSugGet(key, prefix, fuzzy, max));
}

@Override
public Response<List<Tuple>> ftSugGetWithScores(String key, String prefix) {
return appendCommand(commandObjects.ftSugGetWithScores(key, prefix));
}

@Override
public Response<List<Tuple>> ftSugGetWithScores(String key, String prefix, boolean fuzzy, int max) {
return appendCommand(commandObjects.ftSugGetWithScores(key, prefix, fuzzy, max));
}

@Override
public Response<Boolean> ftSugDel(String key, String string) {
return appendCommand(commandObjects.ftSugDel(key, string));
}

@Override
public Response<Long> ftSugLen(String key) {
return appendCommand(commandObjects.ftSugLen(key));
}
// RediSearch commands

// RedisJSON commands
Expand Down
40 changes: 40 additions & 0 deletions src/main/java/redis/clients/jedis/TransactionBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -3479,6 +3479,46 @@ public Response<String> ftConfigSet(String option, String value) {
public Response<String> ftConfigSet(String indexName, String option, String value) {
return appendCommand(commandObjects.ftConfigSet(indexName, option, value));
}

@Override
public Response<Long> ftSugAdd(String key, String string, double score) {
return appendCommand(commandObjects.ftSugAdd(key, string, score));
}

@Override
public Response<Long> ftSugAddIncr(String key, String string, double score) {
return appendCommand(commandObjects.ftSugAddIncr(key, string, score));
}

@Override
public Response<List<String>> ftSugGet(String key, String prefix) {
return appendCommand(commandObjects.ftSugGet(key, prefix));
}

@Override
public Response<List<String>> ftSugGet(String key, String prefix, boolean fuzzy, int max) {
return appendCommand(commandObjects.ftSugGet(key, prefix, fuzzy, max));
}

@Override
public Response<List<Tuple>> ftSugGetWithScores(String key, String prefix) {
return appendCommand(commandObjects.ftSugGetWithScores(key, prefix));
}

@Override
public Response<List<Tuple>> ftSugGetWithScores(String key, String prefix, boolean fuzzy, int max) {
return appendCommand(commandObjects.ftSugGetWithScores(key, prefix, fuzzy, max));
}

@Override
public Response<Boolean> ftSugDel(String key, String string) {
return appendCommand(commandObjects.ftSugDel(key, string));
}

@Override
public Response<Long> ftSugLen(String key) {
return appendCommand(commandObjects.ftSugLen(key));
}
// RediSearch commands

// RedisJSON commands
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package redis.clients.jedis.search;

import java.util.List;
import java.util.Map;

import redis.clients.jedis.Response;
import redis.clients.jedis.resps.Tuple;
import redis.clients.jedis.search.aggr.AggregationBuilder;
import redis.clients.jedis.search.aggr.AggregationResult;

import java.util.List;
import java.util.Map;

public interface RediSearchPipelineCommands {

Response<String> ftCreate(String indexName, IndexOptions indexOptions, Schema schema);
Expand Down Expand Up @@ -54,4 +55,20 @@ default Response<String> ftAlter(String indexName, Schema.Field... fields) {
Response<String> ftConfigSet(String option, String value);

Response<String> ftConfigSet(String indexName, String option, String value);

Response<Long> ftSugAdd(String key, String string, double score);

Response<Long> ftSugAddIncr(String key, String string, double score);

Response<List<String>> ftSugGet(String key, String prefix);

Response<List<String>> ftSugGet(String key, String prefix, boolean fuzzy, int max);

Response<List<Tuple>> ftSugGetWithScores(String key, String prefix);

Response<List<Tuple>> ftSugGetWithScores(String key, String prefix, boolean fuzzy, int max);

Response<Boolean> ftSugDel(String key, String string);

Response<Long> ftSugLen(String key);
}

0 comments on commit 0710e5c

Please sign in to comment.