All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.jedis.search.RediSearchCommands Maven / Gradle / Ivy

There is a newer version: 5.2.0
Show newest version
package redis.clients.jedis.search;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;

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

public interface RediSearchCommands {

  String ftCreate(String indexName, IndexOptions indexOptions, Schema schema);

  default String ftCreate(String indexName, SchemaField... schemaFields) {
    return ftCreate(indexName, Arrays.asList(schemaFields));
  }

  default String ftCreate(String indexName, FTCreateParams createParams, SchemaField... schemaFields) {
    return ftCreate(indexName, createParams, Arrays.asList(schemaFields));
  }

  default String ftCreate(String indexName, Iterable schemaFields) {
    return ftCreate(indexName, FTCreateParams.createParams(), schemaFields);
  }

  String ftCreate(String indexName, FTCreateParams createParams, Iterable schemaFields);

  default String ftAlter(String indexName, Schema.Field... fields) {
    return ftAlter(indexName, Schema.from(fields));
  }

  String ftAlter(String indexName, Schema schema);

  default String ftAlter(String indexName, SchemaField... schemaFields) {
    return ftAlter(indexName, Arrays.asList(schemaFields));
  }

  String ftAlter(String indexName, Iterable schemaFields);

  default SearchResult ftSearch(String indexName) {
    return ftSearch(indexName, "*");
  }

  SearchResult ftSearch(String indexName, String query);

  SearchResult ftSearch(String indexName, String query, FTSearchParams params);

  SearchResult ftSearch(String indexName, Query query);

  SearchResult ftSearch(byte[] indexName, Query query);

  String ftExplain(String indexName, Query query);

  List ftExplainCLI(String indexName, Query query);

  AggregationResult ftAggregate(String indexName, AggregationBuilder aggr);

  AggregationResult ftCursorRead(String indexName, long cursorId, int count);

  String ftCursorDel(String indexName, long cursorId);

  Map.Entry> ftProfileAggregate(String indexName,
      FTProfileParams profileParams, AggregationBuilder aggr);

  Map.Entry> ftProfileSearch(String indexName,
      FTProfileParams profileParams, Query query);

  Map.Entry> ftProfileSearch(String indexName,
      FTProfileParams profileParams, String query, FTSearchParams searchParams);

  String ftDropIndex(String indexName);

  String ftDropIndexDD(String indexName);

  String ftSynUpdate(String indexName, String synonymGroupId, String... terms);

  Map> ftSynDump(String indexName);

  long ftDictAdd(String dictionary, String... terms);

  long ftDictDel(String dictionary, String... terms);

  Set ftDictDump(String dictionary);

  long ftDictAddBySampleKey(String indexName, String dictionary, String... terms);

  long ftDictDelBySampleKey(String indexName, String dictionary, String... terms);

  Set ftDictDumpBySampleKey(String indexName, String dictionary);

  Map> ftSpellCheck(String index, String query);

  Map> ftSpellCheck(String index, String query,
      FTSpellCheckParams spellCheckParams);

  Map ftInfo(String indexName);

  Set ftTagVals(String indexName, String fieldName);

  String ftAliasAdd(String aliasName, String indexName);

  String ftAliasUpdate(String aliasName, String indexName);

  String ftAliasDel(String aliasName);

  Map ftConfigGet(String option);

  Map ftConfigGet(String indexName, String option);

  String ftConfigSet(String option, String value);

  String ftConfigSet(String indexName, String option, String value);

  long ftSugAdd(String key, String string, double score);

  long ftSugAddIncr(String key, String string, double score);

  List ftSugGet(String key, String prefix);

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

  List ftSugGetWithScores(String key, String prefix);

  List ftSugGetWithScores(String key, String prefix, boolean fuzzy, int max);

  boolean ftSugDel(String key, String string);

  long ftSugLen(String key);

  List ftList();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy