Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline RediSearch Suggestion commands #3032

Merged
merged 1 commit into from
Jun 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}