pub struct VectorizerClient { /* private fields */ }Expand description
Vectorizer client
Implementations§
Source§impl VectorizerClient
impl VectorizerClient
Sourcepub fn new(config: ClientConfig) -> Result<Self>
pub fn new(config: ClientConfig) -> Result<Self>
Create a new client with configuration
Sourcepub fn new_default() -> Result<Self>
pub fn new_default() -> Result<Self>
Create a new client with default configuration
Sourcepub fn new_with_url(base_url: &str) -> Result<Self>
pub fn new_with_url(base_url: &str) -> Result<Self>
Create client with custom URL
Sourcepub fn new_with_api_key(base_url: &str, api_key: &str) -> Result<Self>
pub fn new_with_api_key(base_url: &str, api_key: &str) -> Result<Self>
Create client with API key
Sourcepub fn from_connection_string(
connection_string: &str,
api_key: Option<&str>,
) -> Result<Self>
pub fn from_connection_string( connection_string: &str, api_key: Option<&str>, ) -> Result<Self>
Create client from connection string
Sourcepub async fn health_check(&self) -> Result<HealthStatus>
pub async fn health_check(&self) -> Result<HealthStatus>
Health check
Sourcepub async fn list_collections(&self) -> Result<Vec<CollectionInfo>>
pub async fn list_collections(&self) -> Result<Vec<CollectionInfo>>
List collections
Sourcepub async fn search_vectors(
&self,
collection: &str,
query: &str,
limit: Option<usize>,
score_threshold: Option<f32>,
) -> Result<SearchResponse>
pub async fn search_vectors( &self, collection: &str, query: &str, limit: Option<usize>, score_threshold: Option<f32>, ) -> Result<SearchResponse>
Search vectors
Sourcepub async fn intelligent_search(
&self,
request: IntelligentSearchRequest,
) -> Result<IntelligentSearchResponse>
pub async fn intelligent_search( &self, request: IntelligentSearchRequest, ) -> Result<IntelligentSearchResponse>
Intelligent search with multi-query expansion and semantic reranking
Sourcepub async fn semantic_search(
&self,
request: SemanticSearchRequest,
) -> Result<SemanticSearchResponse>
pub async fn semantic_search( &self, request: SemanticSearchRequest, ) -> Result<SemanticSearchResponse>
Semantic search with advanced reranking and similarity thresholds
Sourcepub async fn contextual_search(
&self,
request: ContextualSearchRequest,
) -> Result<ContextualSearchResponse>
pub async fn contextual_search( &self, request: ContextualSearchRequest, ) -> Result<ContextualSearchResponse>
Context-aware search with metadata filtering and contextual reranking
Sourcepub async fn multi_collection_search(
&self,
request: MultiCollectionSearchRequest,
) -> Result<MultiCollectionSearchResponse>
pub async fn multi_collection_search( &self, request: MultiCollectionSearchRequest, ) -> Result<MultiCollectionSearchResponse>
Multi-collection search with cross-collection reranking and aggregation
Sourcepub async fn create_collection(
&self,
name: &str,
dimension: usize,
metric: Option<SimilarityMetric>,
) -> Result<CollectionInfo>
pub async fn create_collection( &self, name: &str, dimension: usize, metric: Option<SimilarityMetric>, ) -> Result<CollectionInfo>
Create collection
Sourcepub async fn insert_texts(
&self,
collection: &str,
texts: Vec<BatchTextRequest>,
) -> Result<BatchResponse>
pub async fn insert_texts( &self, collection: &str, texts: Vec<BatchTextRequest>, ) -> Result<BatchResponse>
Insert texts
Sourcepub async fn delete_collection(&self, name: &str) -> Result<()>
pub async fn delete_collection(&self, name: &str) -> Result<()>
Delete collection
Sourcepub async fn get_vector(
&self,
collection: &str,
vector_id: &str,
) -> Result<Vector>
pub async fn get_vector( &self, collection: &str, vector_id: &str, ) -> Result<Vector>
Get vector
Sourcepub async fn get_collection_info(
&self,
collection: &str,
) -> Result<CollectionInfo>
pub async fn get_collection_info( &self, collection: &str, ) -> Result<CollectionInfo>
Get collection info
Sourcepub async fn embed_text(
&self,
text: &str,
model: Option<&str>,
) -> Result<EmbeddingResponse>
pub async fn embed_text( &self, text: &str, model: Option<&str>, ) -> Result<EmbeddingResponse>
Generate embeddings
Sourcepub async fn discover(
&self,
query: &str,
include_collections: Option<Vec<String>>,
exclude_collections: Option<Vec<String>>,
max_bullets: Option<usize>,
broad_k: Option<usize>,
focus_k: Option<usize>,
) -> Result<Value>
pub async fn discover( &self, query: &str, include_collections: Option<Vec<String>>, exclude_collections: Option<Vec<String>>, max_bullets: Option<usize>, broad_k: Option<usize>, focus_k: Option<usize>, ) -> Result<Value>
Complete discovery pipeline with intelligent search and prompt generation
Sourcepub async fn filter_collections(
&self,
query: &str,
include: Option<Vec<String>>,
exclude: Option<Vec<String>>,
) -> Result<Value>
pub async fn filter_collections( &self, query: &str, include: Option<Vec<String>>, exclude: Option<Vec<String>>, ) -> Result<Value>
Pre-filter collections by name patterns
Sourcepub async fn score_collections(
&self,
query: &str,
name_match_weight: Option<f32>,
term_boost_weight: Option<f32>,
signal_boost_weight: Option<f32>,
) -> Result<Value>
pub async fn score_collections( &self, query: &str, name_match_weight: Option<f32>, term_boost_weight: Option<f32>, signal_boost_weight: Option<f32>, ) -> Result<Value>
Rank collections by relevance
Sourcepub async fn expand_queries(
&self,
query: &str,
max_expansions: Option<usize>,
include_definition: Option<bool>,
include_features: Option<bool>,
include_architecture: Option<bool>,
) -> Result<Value>
pub async fn expand_queries( &self, query: &str, max_expansions: Option<usize>, include_definition: Option<bool>, include_features: Option<bool>, include_architecture: Option<bool>, ) -> Result<Value>
Generate query variations
Sourcepub async fn get_file_content(
&self,
collection: &str,
file_path: &str,
max_size_kb: Option<usize>,
) -> Result<Value>
pub async fn get_file_content( &self, collection: &str, file_path: &str, max_size_kb: Option<usize>, ) -> Result<Value>
Retrieve complete file content from a collection
Sourcepub async fn list_files_in_collection(
&self,
collection: &str,
filter_by_type: Option<Vec<String>>,
min_chunks: Option<usize>,
max_results: Option<usize>,
sort_by: Option<&str>,
) -> Result<Value>
pub async fn list_files_in_collection( &self, collection: &str, filter_by_type: Option<Vec<String>>, min_chunks: Option<usize>, max_results: Option<usize>, sort_by: Option<&str>, ) -> Result<Value>
List all indexed files in a collection
Sourcepub async fn get_file_summary(
&self,
collection: &str,
file_path: &str,
summary_type: Option<&str>,
max_sentences: Option<usize>,
) -> Result<Value>
pub async fn get_file_summary( &self, collection: &str, file_path: &str, summary_type: Option<&str>, max_sentences: Option<usize>, ) -> Result<Value>
Get extractive or structural summary of an indexed file
Sourcepub async fn get_file_chunks_ordered(
&self,
collection: &str,
file_path: &str,
start_chunk: Option<usize>,
limit: Option<usize>,
include_context: Option<bool>,
) -> Result<Value>
pub async fn get_file_chunks_ordered( &self, collection: &str, file_path: &str, start_chunk: Option<usize>, limit: Option<usize>, include_context: Option<bool>, ) -> Result<Value>
Retrieve chunks in original file order for progressive reading
Sourcepub async fn get_project_outline(
&self,
collection: &str,
max_depth: Option<usize>,
include_summaries: Option<bool>,
highlight_key_files: Option<bool>,
) -> Result<Value>
pub async fn get_project_outline( &self, collection: &str, max_depth: Option<usize>, include_summaries: Option<bool>, highlight_key_files: Option<bool>, ) -> Result<Value>
Generate hierarchical project structure overview
Find semantically related files using vector similarity