pub struct IrVectorSearch {Show 14 fields
pub source: IrSource,
pub vector_col: String,
pub distance_op: &'static str,
pub query_expr: IrExpr,
pub object_shape: Vec<IrShapePointer>,
pub filter: Option<IrExpr>,
pub order_by_distance: Option<IrSortDir>,
pub offset: Option<IrExpr>,
pub limit: Option<IrExpr>,
pub inference_query_param_name: Option<String>,
pub inference_query_literal: Option<String>,
pub inference_model: Option<String>,
pub inference_type_name: Option<String>,
pub inference_index_name: Option<Option<String>>,
}Expand description
select vector::search(Type, $vec) { object { … }, distance }
Emits a single SELECT from the type’s table that computes the distance
inline and returns a virtual { object, distance } shape.
Text overload: vector::search(Type, query := $text) — the Python layer
embeds the text first and injects the resulting vector as __deferred_vec__.
Fields§
§source: IrSourceThe searched type as an IrSource (table + alias).
vector_col: Stringpgvector column name, e.g. __vector__.
distance_op: &'static strpgvector distance operator: <=>, <->, or <#>.
query_expr: IrExprThe query vector expression (e.g. $1::vector).
For the text overload this is the __deferred_vec__ param cast to vector.
object_shape: Vec<IrShapePointer>Pointers to include in the object sub-tuple (from the object { … } shape).
Empty means no explicit shape was given; the SQL emitter uses all properties.
filter: Option<IrExpr>§order_by_distance: Option<IrSortDir>None = no ORDER BY; Some(dir) = ORDER BY distance in that direction.
Only distance ordering is supported for v1.
offset: Option<IrExpr>§limit: Option<IrExpr>§inference_query_param_name: Option<String>Name of the user’s query := param; empty string when an inline literal.
inference_query_literal: Option<String>Inline literal query text when query := 'some text'.
inference_model: Option<String>Embedding model identifier from the VectorIndexDescriptor, e.g. "mistral-embed".
inference_type_name: Option<String>Qualified type name for provider lookup, e.g. "default::Product".
inference_index_name: Option<Option<String>>Vector index name for provider lookup (None = default index).
Trait Implementations§
Source§impl Clone for IrVectorSearch
impl Clone for IrVectorSearch
Auto Trait Implementations§
impl Freeze for IrVectorSearch
impl RefUnwindSafe for IrVectorSearch
impl Send for IrVectorSearch
impl Sync for IrVectorSearch
impl Unpin for IrVectorSearch
impl UnsafeUnpin for IrVectorSearch
impl UnwindSafe for IrVectorSearch
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§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.