pub struct VectorSearchOptions {
pub top: usize,
pub skip: usize,
pub include_vectors: bool,
pub vector_field_name: Option<String>,
pub filter: Option<FilterExpression>,
pub provider_filter: Option<String>,
}Expand description
Paging and shaping options for a search.
Fields§
§top: usizeMaximum number of records to return. Must be greater than zero.
skip: usizeNumber of leading records to skip.
include_vectors: boolWhether returned records carry their vector fields.
vector_field_name: Option<String>Which vector field to search, when the collection has several.
filter: Option<FilterExpression>A portable filter, translated by each connector into its own dialect.
See filters for the operator set and its semantics. A connector
that cannot express an operator refuses the search rather than
dropping the condition — a dropped filter reads as a passing retrieval
test while scoping is silently broken.
provider_filter: Option<String>A filter in the provider’s own dialect, passed through verbatim.
The escape hatch for what the portable operator set cannot say —
Azure AI Search’s search.ismatch, a geo predicate, a provider
function. It is not portable: a collection swapped for another
provider’s will reject it. When both this and Self::filter are
set, a connector conjoins them.
Implementations§
Source§impl VectorSearchOptions
impl VectorSearchOptions
pub fn new(top: usize) -> VectorSearchOptions
pub fn with_skip(self, skip: usize) -> VectorSearchOptions
pub fn with_include_vectors(self, include: bool) -> VectorSearchOptions
pub fn with_vector_field_name( self, name: impl Into<String>, ) -> VectorSearchOptions
Sourcepub fn with_filter(
self,
filter: impl Into<FilterExpression>,
) -> VectorSearchOptions
pub fn with_filter( self, filter: impl Into<FilterExpression>, ) -> VectorSearchOptions
Scope the search with a portable FilterExpression.
Sourcepub fn with_provider_filter(
self,
filter: impl Into<String>,
) -> VectorSearchOptions
pub fn with_provider_filter( self, filter: impl Into<String>, ) -> VectorSearchOptions
Scope the search with a filter in the provider’s own dialect.
Trait Implementations§
Source§impl Clone for VectorSearchOptions
impl Clone for VectorSearchOptions
Source§fn clone(&self) -> VectorSearchOptions
fn clone(&self) -> VectorSearchOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more