Trait fred::interfaces::RediSearchInterface
source · pub trait RediSearchInterface: ClientLike + Sized {
Show 26 methods
// Provided methods
fn ft_list<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis { ... }
fn ft_aggregate<R, I, Q>(
&self,
index: I,
query: Q,
options: FtAggregateOptions,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str>,
Q: Into<Str> { ... }
fn ft_search<R, I, Q>(
&self,
index: I,
query: Q,
options: FtSearchOptions,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str>,
Q: Into<Str> { ... }
fn ft_create<R, I>(
&self,
index: I,
options: FtCreateOptions,
schema: Vec<SearchSchema>,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str> { ... }
fn ft_alter<R, I>(
&self,
index: I,
options: FtAlterOptions,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str> { ... }
fn ft_aliasadd<R, A, I>(
&self,
alias: A,
index: I,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
A: Into<Str>,
I: Into<Str> { ... }
fn ft_aliasdel<R, A>(
&self,
alias: A,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
A: Into<Str> { ... }
fn ft_aliasupdate<R, A, I>(
&self,
alias: A,
index: I,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
A: Into<Str>,
I: Into<Str> { ... }
fn ft_config_get<R, S>(
&self,
option: S,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
S: Into<Str> { ... }
fn ft_config_set<R, S, V>(
&self,
option: S,
value: V,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
S: Into<Str>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError> { ... }
fn ft_cursor_del<R, I, C>(
&self,
index: I,
cursor: C,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str>,
C: TryInto<RedisValue>,
C::Error: Into<RedisError> { ... }
fn ft_cursor_read<R, I, C>(
&self,
index: I,
cursor: C,
count: Option<u64>,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str>,
C: TryInto<RedisValue>,
C::Error: Into<RedisError> { ... }
fn ft_dictadd<R, D, S>(
&self,
dict: D,
terms: S,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
D: Into<Str>,
S: Into<MultipleStrings> { ... }
fn ft_dictdel<R, D, S>(
&self,
dict: D,
terms: S,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
D: Into<Str>,
S: Into<MultipleStrings> { ... }
fn ft_dictdump<R, D>(&self, dict: D) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
D: Into<Str> { ... }
fn ft_dropindex<R, I>(
&self,
index: I,
dd: bool,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str> { ... }
fn ft_explain<R, I, Q>(
&self,
index: I,
query: Q,
dialect: Option<i64>,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str>,
Q: Into<Str> { ... }
fn ft_info<R, I>(&self, index: I) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str> { ... }
fn ft_spellcheck<R, I, Q>(
&self,
index: I,
query: Q,
distance: Option<u8>,
terms: Option<SpellcheckTerms>,
dialect: Option<i64>,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str>,
Q: Into<Str> { ... }
fn ft_sugadd<R, K, S>(
&self,
key: K,
string: S,
score: f64,
incr: bool,
payload: Option<Bytes>,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
S: Into<Str> { ... }
fn ft_sugdel<R, K, S>(
&self,
key: K,
string: S,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
S: Into<Str> { ... }
fn ft_sugget<R, K, P>(
&self,
key: K,
prefix: P,
fuzzy: bool,
withscores: bool,
withpayloads: bool,
max: Option<u64>,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
P: Into<Str> { ... }
fn ft_suglen<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey> { ... }
fn ft_syndump<R, I>(&self, index: I) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str> { ... }
fn ft_synupdate<R, I, S, T>(
&self,
index: I,
synonym_group_id: S,
skipinitialscan: bool,
terms: T,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str>,
S: Into<Str>,
T: Into<MultipleStrings> { ... }
fn ft_tagvals<R, I, F>(
&self,
index: I,
field_name: F,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
I: Into<Str>,
F: Into<Str> { ... }
}i-redisearch only.Expand description
A RediSearch interface.
Provided Methods§
sourcefn ft_list<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
fn ft_list<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
Returns a list of all existing indexes.
sourcefn ft_aggregate<R, I, Q>(
&self,
index: I,
query: Q,
options: FtAggregateOptions,
) -> impl Future<Output = RedisResult<R>>
fn ft_aggregate<R, I, Q>( &self, index: I, query: Q, options: FtAggregateOptions, ) -> impl Future<Output = RedisResult<R>>
Run a search query on an index, and perform aggregate transformations on the results.
sourcefn ft_search<R, I, Q>(
&self,
index: I,
query: Q,
options: FtSearchOptions,
) -> impl Future<Output = RedisResult<R>>
fn ft_search<R, I, Q>( &self, index: I, query: Q, options: FtSearchOptions, ) -> impl Future<Output = RedisResult<R>>
Search the index with a textual query, returning either documents or just ids.
https://redis.io/docs/latest/commands/ft.search/
Note: FT.SEARCH uses a different format in RESP3 mode.
sourcefn ft_create<R, I>(
&self,
index: I,
options: FtCreateOptions,
schema: Vec<SearchSchema>,
) -> impl Future<Output = RedisResult<R>>
fn ft_create<R, I>( &self, index: I, options: FtCreateOptions, schema: Vec<SearchSchema>, ) -> impl Future<Output = RedisResult<R>>
Create an index with the given specification.
sourcefn ft_alter<R, I>(
&self,
index: I,
options: FtAlterOptions,
) -> impl Future<Output = RedisResult<R>>
fn ft_alter<R, I>( &self, index: I, options: FtAlterOptions, ) -> impl Future<Output = RedisResult<R>>
Add a new attribute to the index.
sourcefn ft_aliasadd<R, A, I>(
&self,
alias: A,
index: I,
) -> impl Future<Output = RedisResult<R>>
fn ft_aliasadd<R, A, I>( &self, alias: A, index: I, ) -> impl Future<Output = RedisResult<R>>
Add an alias to an index.
sourcefn ft_aliasdel<R, A>(&self, alias: A) -> impl Future<Output = RedisResult<R>>
fn ft_aliasdel<R, A>(&self, alias: A) -> impl Future<Output = RedisResult<R>>
Remove an alias from an index.
sourcefn ft_aliasupdate<R, A, I>(
&self,
alias: A,
index: I,
) -> impl Future<Output = RedisResult<R>>
fn ft_aliasupdate<R, A, I>( &self, alias: A, index: I, ) -> impl Future<Output = RedisResult<R>>
Add an alias to an index. If the alias is already associated with another index, FT.ALIASUPDATE removes the alias association with the previous index.
sourcefn ft_config_get<R, S>(&self, option: S) -> impl Future<Output = RedisResult<R>>
fn ft_config_get<R, S>(&self, option: S) -> impl Future<Output = RedisResult<R>>
Retrieve configuration options.
sourcefn ft_config_set<R, S, V>(
&self,
option: S,
value: V,
) -> impl Future<Output = RedisResult<R>>
fn ft_config_set<R, S, V>( &self, option: S, value: V, ) -> impl Future<Output = RedisResult<R>>
Set the value of a RediSearch configuration parameter.
sourcefn ft_cursor_del<R, I, C>(
&self,
index: I,
cursor: C,
) -> impl Future<Output = RedisResult<R>>
fn ft_cursor_del<R, I, C>( &self, index: I, cursor: C, ) -> impl Future<Output = RedisResult<R>>
Delete a cursor.
sourcefn ft_cursor_read<R, I, C>(
&self,
index: I,
cursor: C,
count: Option<u64>,
) -> impl Future<Output = RedisResult<R>>
fn ft_cursor_read<R, I, C>( &self, index: I, cursor: C, count: Option<u64>, ) -> impl Future<Output = RedisResult<R>>
Read next results from an existing cursor.
sourcefn ft_dictadd<R, D, S>(
&self,
dict: D,
terms: S,
) -> impl Future<Output = RedisResult<R>>
fn ft_dictadd<R, D, S>( &self, dict: D, terms: S, ) -> impl Future<Output = RedisResult<R>>
Add terms to a dictionary.
sourcefn ft_dictdel<R, D, S>(
&self,
dict: D,
terms: S,
) -> impl Future<Output = RedisResult<R>>
fn ft_dictdel<R, D, S>( &self, dict: D, terms: S, ) -> impl Future<Output = RedisResult<R>>
Remove terms from a dictionary.
sourcefn ft_dictdump<R, D>(&self, dict: D) -> impl Future<Output = RedisResult<R>>
fn ft_dictdump<R, D>(&self, dict: D) -> impl Future<Output = RedisResult<R>>
Dump all terms in the given dictionary.
sourcefn ft_dropindex<R, I>(
&self,
index: I,
dd: bool,
) -> impl Future<Output = RedisResult<R>>
fn ft_dropindex<R, I>( &self, index: I, dd: bool, ) -> impl Future<Output = RedisResult<R>>
Delete an index.
sourcefn ft_explain<R, I, Q>(
&self,
index: I,
query: Q,
dialect: Option<i64>,
) -> impl Future<Output = RedisResult<R>>
fn ft_explain<R, I, Q>( &self, index: I, query: Q, dialect: Option<i64>, ) -> impl Future<Output = RedisResult<R>>
Return the execution plan for a complex query.
sourcefn ft_info<R, I>(&self, index: I) -> impl Future<Output = RedisResult<R>>
fn ft_info<R, I>(&self, index: I) -> impl Future<Output = RedisResult<R>>
Return information and statistics on the index.
sourcefn ft_spellcheck<R, I, Q>(
&self,
index: I,
query: Q,
distance: Option<u8>,
terms: Option<SpellcheckTerms>,
dialect: Option<i64>,
) -> impl Future<Output = RedisResult<R>>
fn ft_spellcheck<R, I, Q>( &self, index: I, query: Q, distance: Option<u8>, terms: Option<SpellcheckTerms>, dialect: Option<i64>, ) -> impl Future<Output = RedisResult<R>>
Perform spelling correction on a query, returning suggestions for misspelled terms.
sourcefn ft_sugadd<R, K, S>(
&self,
key: K,
string: S,
score: f64,
incr: bool,
payload: Option<Bytes>,
) -> impl Future<Output = RedisResult<R>>
fn ft_sugadd<R, K, S>( &self, key: K, string: S, score: f64, incr: bool, payload: Option<Bytes>, ) -> impl Future<Output = RedisResult<R>>
Add a suggestion string to an auto-complete suggestion dictionary.
sourcefn ft_sugdel<R, K, S>(
&self,
key: K,
string: S,
) -> impl Future<Output = RedisResult<R>>
fn ft_sugdel<R, K, S>( &self, key: K, string: S, ) -> impl Future<Output = RedisResult<R>>
Delete a string from a suggestion index.
sourcefn ft_sugget<R, K, P>(
&self,
key: K,
prefix: P,
fuzzy: bool,
withscores: bool,
withpayloads: bool,
max: Option<u64>,
) -> impl Future<Output = RedisResult<R>>
fn ft_sugget<R, K, P>( &self, key: K, prefix: P, fuzzy: bool, withscores: bool, withpayloads: bool, max: Option<u64>, ) -> impl Future<Output = RedisResult<R>>
Get completion suggestions for a prefix.
sourcefn ft_suglen<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
fn ft_suglen<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
Get the size of an auto-complete suggestion dictionary.
sourcefn ft_syndump<R, I>(&self, index: I) -> impl Future<Output = RedisResult<R>>
fn ft_syndump<R, I>(&self, index: I) -> impl Future<Output = RedisResult<R>>
Dump the contents of a synonym group.
sourcefn ft_synupdate<R, I, S, T>(
&self,
index: I,
synonym_group_id: S,
skipinitialscan: bool,
terms: T,
) -> impl Future<Output = RedisResult<R>>
fn ft_synupdate<R, I, S, T>( &self, index: I, synonym_group_id: S, skipinitialscan: bool, terms: T, ) -> impl Future<Output = RedisResult<R>>
Update a synonym group.
sourcefn ft_tagvals<R, I, F>(
&self,
index: I,
field_name: F,
) -> impl Future<Output = RedisResult<R>>
fn ft_tagvals<R, I, F>( &self, index: I, field_name: F, ) -> impl Future<Output = RedisResult<R>>
Return a distinct set of values indexed in a Tag field.