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> { ... }
}
Available on crate feature i-redisearch only.
Expand description

A RediSearch interface.

Provided Methods§

source

fn ft_list<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,

Returns a list of all existing indexes.

https://redis.io/docs/latest/commands/ft._list/

source

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>,

Run a search query on an index, and perform aggregate transformations on the results.

https://redis.io/docs/latest/commands/ft.aggregate/

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.

source

fn ft_create<R, I>( &self, index: I, options: FtCreateOptions, schema: Vec<SearchSchema>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, I: Into<Str>,

Create an index with the given specification.

https://redis.io/docs/latest/commands/ft.create/

source

fn ft_alter<R, I>( &self, index: I, options: FtAlterOptions, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, I: Into<Str>,

Add a new attribute to the index.

https://redis.io/docs/latest/commands/ft.alter/

source

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>,

source

fn ft_aliasdel<R, A>(&self, alias: A) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, A: Into<Str>,

source

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>,

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.

https://redis.io/docs/latest/commands/ft.aliasupdate/

source

fn ft_config_get<R, S>(&self, option: S) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, S: Into<Str>,

source

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>,

Set the value of a RediSearch configuration parameter.

https://redis.io/docs/latest/commands/ft.config-set/

source

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>,

source

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>,

Read next results from an existing cursor.

https://redis.io/docs/latest/commands/ft.cursor-read/

source

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>,

source

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>,

Remove terms from a dictionary.

https://redis.io/docs/latest/commands/ft.dictdel/

source

fn ft_dictdump<R, D>(&self, dict: D) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, D: Into<Str>,

Dump all terms in the given dictionary.

https://redis.io/docs/latest/commands/ft.dictdump/

source

fn ft_dropindex<R, I>( &self, index: I, dd: bool, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, I: Into<Str>,

source

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>,

Return the execution plan for a complex query.

https://redis.io/docs/latest/commands/ft.explain/

source

fn ft_info<R, I>(&self, index: I) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, I: Into<Str>,

Return information and statistics on the index.

https://redis.io/docs/latest/commands/ft.info/

source

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>,

Perform spelling correction on a query, returning suggestions for misspelled terms.

https://redis.io/docs/latest/commands/ft.spellcheck/

source

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>,

Add a suggestion string to an auto-complete suggestion dictionary.

https://redis.io/docs/latest/commands/ft.sugadd/

source

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>,

Delete a string from a suggestion index.

https://redis.io/docs/latest/commands/ft.sugdel/

source

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>,

Get completion suggestions for a prefix.

https://redis.io/docs/latest/commands/ft.sugget/

source

fn ft_suglen<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Get the size of an auto-complete suggestion dictionary.

https://redis.io/docs/latest/commands/ft.suglen/

source

fn ft_syndump<R, I>(&self, index: I) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, I: Into<Str>,

Dump the contents of a synonym group.

https://redis.io/docs/latest/commands/ft.syndump/

source

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>,

source

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>,

Return a distinct set of values indexed in a Tag field.

https://redis.io/docs/latest/commands/ft.tagvals/

Object Safety§

This trait is not object safe.

Implementors§