pub struct IndexManager { /* private fields */ }Expand description
Integrated Index Manager combining all index types
Implementations§
Source§impl IntegratedIndexManager
impl IntegratedIndexManager
Sourcepub fn with_config(config: IntegratedIndexConfig) -> Self
pub fn with_config(config: IntegratedIndexConfig) -> Self
Create with custom configuration
Sourcepub fn index_vector(&self, collection: &str, id: EntityId, vector: &[f32])
pub fn index_vector(&self, collection: &str, id: EntityId, vector: &[f32])
Index a vector for similarity search
Sourcepub fn search_similar(
&self,
collection: &str,
query: &[f32],
k: usize,
) -> Vec<VectorSearchResult>
pub fn search_similar( &self, collection: &str, query: &[f32], k: usize, ) -> Vec<VectorSearchResult>
Search for similar vectors
Sourcepub fn index_text(
&self,
collection: &str,
id: EntityId,
field: &str,
content: &str,
)
pub fn index_text( &self, collection: &str, id: EntityId, field: &str, content: &str, )
Index text content for full-text search
Sourcepub fn search_text(&self, query: &str, limit: usize) -> Vec<TextSearchResult>
pub fn search_text(&self, query: &str, limit: usize) -> Vec<TextSearchResult>
Full-text search
Sourcepub fn autocomplete(&self, prefix: &str, limit: usize) -> Vec<String>
pub fn autocomplete(&self, prefix: &str, limit: usize) -> Vec<String>
Prefix search for autocomplete
Sourcepub fn index_metadata(
&self,
_collection: &str,
id: EntityId,
metadata: &Metadata,
)
pub fn index_metadata( &self, _collection: &str, id: EntityId, metadata: &Metadata, )
Index metadata for range queries
Sourcepub fn query_metadata(
&self,
key: &str,
filter: MetadataQueryFilter,
) -> Vec<EntityId>
pub fn query_metadata( &self, key: &str, filter: MetadataQueryFilter, ) -> Vec<EntityId>
Query metadata with filters
Sourcepub fn remove_entity(&self, id: EntityId)
pub fn remove_entity(&self, id: EntityId)
Remove entity from all indices
Sourcepub fn index_edge(
&self,
edge_id: EntityId,
source_id: EntityId,
target_id: EntityId,
label: &str,
weight: f32,
)
pub fn index_edge( &self, edge_id: EntityId, source_id: EntityId, target_id: EntityId, label: &str, weight: f32, )
Index an edge in the graph adjacency index
Sourcepub fn get_neighbors(
&self,
node_id: EntityId,
direction: EdgeDirection,
label_filter: Option<&str>,
) -> Vec<AdjacencyEntry>
pub fn get_neighbors( &self, node_id: EntityId, direction: EdgeDirection, label_filter: Option<&str>, ) -> Vec<AdjacencyEntry>
Get neighbors of a node in a given direction
Sourcepub fn get_edges_by_label(&self, label: &str) -> Vec<EntityId>
pub fn get_edges_by_label(&self, label: &str) -> Vec<EntityId>
Get all edges with a specific label
Sourcepub fn node_degree(&self, node_id: EntityId, direction: EdgeDirection) -> usize
pub fn node_degree(&self, node_id: EntityId, direction: EdgeDirection) -> usize
Get degree of a node
Sourcepub fn graph_index(&self) -> &GraphAdjacencyIndex
pub fn graph_index(&self) -> &GraphAdjacencyIndex
Get a reference to the graph adjacency index
Sourcepub fn create_index(
&self,
index_type: IndexType,
collection: Option<&str>,
) -> Result<(), String>
pub fn create_index( &self, index_type: IndexType, collection: Option<&str>, ) -> Result<(), String>
Create a new index of the specified type for a collection
Sourcepub fn drop_index(
&self,
index_type: IndexType,
collection: Option<&str>,
) -> Result<(), String>
pub fn drop_index( &self, index_type: IndexType, collection: Option<&str>, ) -> Result<(), String>
Drop an index
Sourcepub fn rebuild_index(
&self,
index_type: IndexType,
collection: Option<&str>,
) -> Result<(), String>
pub fn rebuild_index( &self, index_type: IndexType, collection: Option<&str>, ) -> Result<(), String>
Rebuild an index (clear and recreate)
Sourcepub fn index_status(
&self,
index_type: IndexType,
collection: Option<&str>,
) -> IndexStatus
pub fn index_status( &self, index_type: IndexType, collection: Option<&str>, ) -> IndexStatus
Get the status of an index
Sourcepub fn all_index_statuses(
&self,
) -> HashMap<(IndexType, Option<String>), IndexStatus>
pub fn all_index_statuses( &self, ) -> HashMap<(IndexType, Option<String>), IndexStatus>
Get all index statuses
Sourcepub fn event_history(&self) -> Vec<IndexEvent>
pub fn event_history(&self) -> Vec<IndexEvent>
Get index event history
Sourcepub fn stats(&self) -> IndexStats
pub fn stats(&self) -> IndexStats
Get index statistics
Sourcepub fn config(&self) -> &IntegratedIndexConfig
pub fn config(&self) -> &IntegratedIndexConfig
Get configuration
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for IntegratedIndexManager
impl !RefUnwindSafe for IntegratedIndexManager
impl Send for IntegratedIndexManager
impl Sync for IntegratedIndexManager
impl Unpin for IntegratedIndexManager
impl UnsafeUnpin for IntegratedIndexManager
impl UnwindSafe for IntegratedIndexManager
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
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> 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>
Converts
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>
Converts
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request