pub struct RuvectorQuery {
pub vector: Option<Vec<f32>>,
pub text: Option<String>,
pub node_id: Option<u64>,
pub mode: QueryMode,
pub k: usize,
pub ef: usize,
pub gnn_depth: usize,
pub temperature: f32,
pub return_attention: bool,
}Expand description
Query configuration for RuVector searches
Fields§
§vector: Option<Vec<f32>>Query vector for similarity search
text: Option<String>Text query (requires embedding model)
node_id: Option<u64>Node ID for subgraph extraction
mode: QueryModeSearch mode
k: usizeNumber of results to return
ef: usizeHNSW search parameter (exploration factor)
gnn_depth: usizeGNN depth for neural search
temperature: f32Temperature for differentiable search (higher = softer)
return_attention: boolWhether to return attention weights
Implementations§
Source§impl RuvectorQuery
impl RuvectorQuery
Sourcepub fn vector_search(vector: Vec<f32>, k: usize) -> Self
pub fn vector_search(vector: Vec<f32>, k: usize) -> Self
Sourcepub fn subgraph_search(vector: Vec<f32>, k: usize) -> Self
pub fn subgraph_search(vector: Vec<f32>, k: usize) -> Self
Sourcepub fn differentiable_search(
vector: Vec<f32>,
k: usize,
temperature: f32,
) -> Self
pub fn differentiable_search( vector: Vec<f32>, k: usize, temperature: f32, ) -> Self
Create a differentiable search query with temperature
§Arguments
vector- Query vectork- Number of resultstemperature- Softmax temperature (higher = softer distribution)
Sourcepub fn with_attention(self) -> Self
pub fn with_attention(self) -> Self
Enable attention weight return
Trait Implementations§
Source§impl Clone for RuvectorQuery
impl Clone for RuvectorQuery
Source§fn clone(&self) -> RuvectorQuery
fn clone(&self) -> RuvectorQuery
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 moreSource§impl Debug for RuvectorQuery
impl Debug for RuvectorQuery
Source§impl Default for RuvectorQuery
impl Default for RuvectorQuery
Source§impl<'de> Deserialize<'de> for RuvectorQuery
impl<'de> Deserialize<'de> for RuvectorQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RuvectorQuery
impl RefUnwindSafe for RuvectorQuery
impl Send for RuvectorQuery
impl Sync for RuvectorQuery
impl Unpin for RuvectorQuery
impl UnwindSafe for RuvectorQuery
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