pub struct VectorIndexQuery {
pub query: Vector,
pub params: VectorIndexQueryParams,
pub field_name: Option<String>,
}Expand description
Low-level query for a single-vector search against a vector index.
This type represents a single nearest-neighbor query at the index level,
in contrast to the high-level VectorSearchRequest which can contain
multiple query vectors and aggregation settings.
Naming convention: low-level index operations use “Query” (e.g.,
VectorIndexQuery, VectorIndexQueryParams), while high-level
store/engine operations use “Request” (e.g., VectorSearchRequest).
Fields§
§query: VectorThe query vector.
params: VectorIndexQueryParamsSearch configuration.
field_name: Option<String>Optional field name to filter search results. If None, searches across all fields.
Implementations§
Source§impl VectorIndexQuery
impl VectorIndexQuery
Sourcepub fn min_similarity(self, threshold: f32) -> Self
pub fn min_similarity(self, threshold: f32) -> Self
Set minimum similarity threshold.
Sourcepub fn include_scores(self, include: bool) -> Self
pub fn include_scores(self, include: bool) -> Self
Set whether to include scores in results.
Sourcepub fn include_vectors(self, include: bool) -> Self
pub fn include_vectors(self, include: bool) -> Self
Set whether to include vectors in results.
Sourcepub fn timeout_ms(self, timeout: u64) -> Self
pub fn timeout_ms(self, timeout: u64) -> Self
Set search timeout in milliseconds.
Sourcepub fn field_name(self, field_name: String) -> Self
pub fn field_name(self, field_name: String) -> Self
Set field name to filter search results.
Trait Implementations§
Source§impl Clone for VectorIndexQuery
impl Clone for VectorIndexQuery
Source§fn clone(&self) -> VectorIndexQuery
fn clone(&self) -> VectorIndexQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for VectorIndexQuery
impl RefUnwindSafe for VectorIndexQuery
impl Send for VectorIndexQuery
impl Sync for VectorIndexQuery
impl Unpin for VectorIndexQuery
impl UnsafeUnpin for VectorIndexQuery
impl UnwindSafe for VectorIndexQuery
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.