pub struct SearchBatchConfig {
pub index: String,
pub query: String,
pub batch_size: usize,
pub max_rows: Option<usize>,
pub sort_by: Option<(String, bool)>,
}Expand description
Configuration for search-based batch iteration.
Fields§
§index: StringRediSearch index name.
query: StringSearch query string (e.g., “@age:[30 +inf]”).
batch_size: usizeNumber of documents to fetch per batch.
max_rows: Option<usize>Maximum total rows to return (None for unlimited).
sort_by: Option<(String, bool)>Sort by field and direction (field_name, ascending).
Implementations§
Source§impl SearchBatchConfig
impl SearchBatchConfig
Sourcepub fn new(index: impl Into<String>, query: impl Into<String>) -> Self
pub fn new(index: impl Into<String>, query: impl Into<String>) -> Self
Create a new SearchBatchConfig with the given index and query.
§Arguments
index- The RediSearch index namequery- The search query (e.g., “@field:value”, “*” for all)
Sourcepub fn with_batch_size(self, size: usize) -> Self
pub fn with_batch_size(self, size: usize) -> Self
Set the batch size.
Sourcepub fn with_max_rows(self, max: usize) -> Self
pub fn with_max_rows(self, max: usize) -> Self
Set the maximum number of rows to return.
Trait Implementations§
Source§impl Clone for SearchBatchConfig
impl Clone for SearchBatchConfig
Source§fn clone(&self) -> SearchBatchConfig
fn clone(&self) -> SearchBatchConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SearchBatchConfig
impl RefUnwindSafe for SearchBatchConfig
impl Send for SearchBatchConfig
impl Sync for SearchBatchConfig
impl Unpin for SearchBatchConfig
impl UnwindSafe for SearchBatchConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more