#[non_exhaustive]pub struct SchemaTextField { /* private fields */ }search_unfinished only.Expand description
Represents a text field in the schema.
Implementations§
Source§impl SchemaTextField
impl SchemaTextField
Sourcepub fn no_stem(self, no_stem: bool) -> Self
pub fn no_stem(self, no_stem: bool) -> Self
Disables stemming when indexing the text field’s values. This may be ideal for things like proper names. https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/stemming/
Sourcepub fn weight(self, weight: f64) -> Self
pub fn weight(self, weight: f64) -> Self
Declares the importance of this attribute when calculating result accuracy. This is a multiplication factor and defaults to 1 if not specified.
Sourcepub fn phonetic(self, phonetic: Phonetic) -> Self
pub fn phonetic(self, phonetic: Phonetic) -> Self
Declaring a text attribute as PHONETIC will perform phonetic matching on it in searches by default. https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/phonetic_matching/
Sourcepub fn with_suffix_trie(self, with_suffix_trie: bool) -> Self
pub fn with_suffix_trie(self, with_suffix_trie: bool) -> Self
Keeps a suffix trie with all terms which match the suffix. It is used to optimize contains (foo) and suffix (*foo) queries. Otherwise, a brute-force search on the trie is performed. If suffix trie exists for some fields, these queries will be disabled for other fields.
Sourcepub fn index_empty(self, index_empty: bool) -> Self
pub fn index_empty(self, index_empty: bool) -> Self
Index empty strings. This allows searching for empty values - documents that do not contain a specific field. By default, empty strings are not indexed.
Sourcepub fn no_index(self, no_index: bool) -> Self
pub fn no_index(self, no_index: bool) -> Self
Mark the field as no index. This means that the field will not be indexed.
Sourcepub fn index_missing(self, index_missing: bool) -> Self
pub fn index_missing(self, index_missing: bool) -> Self
Set index missing. This allows searching for missing values - documents that do not contain a specific field.
Trait Implementations§
Source§impl Clone for SchemaTextField
impl Clone for SchemaTextField
Source§fn clone(&self) -> SchemaTextField
fn clone(&self) -> SchemaTextField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SchemaTextField
impl Debug for SchemaTextField
Source§impl Default for SchemaTextField
impl Default for SchemaTextField
Source§impl From<SchemaTextField> for FieldDefinition
impl From<SchemaTextField> for FieldDefinition
Source§fn from(field: SchemaTextField) -> Self
fn from(field: SchemaTextField) -> Self
Source§impl ToRedisArgs for SchemaTextField
impl ToRedisArgs for SchemaTextField
Source§fn write_redis_args<W>(&self, out: &mut W)where
W: ?Sized + RedisWrite,
fn write_redis_args<W>(&self, out: &mut W)where
W: ?Sized + RedisWrite,
Source§fn to_redis_args(&self) -> Vec<Vec<u8>>
fn to_redis_args(&self) -> Vec<Vec<u8>>
Source§fn describe_numeric_behavior(&self) -> NumericBehavior
fn describe_numeric_behavior(&self) -> NumericBehavior
INCR vs INCRBYFLOAT).