pub struct IntegratedIndexManager { /* 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 Forget for IntegratedIndexManager
impl Move for IntegratedIndexManager
impl Send for IntegratedIndexManagerwhere
RwLock<RawRwLock, BTreeMap<String, Vec<PostingEntry>>>: Send,
RwLock<RawRwLock, usize>: Send,
RwLock<RawRwLock, HashMap<String, HashSet<String>>>: Send,
RwLock<RawRwLock, MetadataStorage>: Send,
RwLock<RawRwLock, HashMap<String, HnswIndexInfo>>: Send,
RwLock<RawRwLock, HashMap<EntityId, Vec<AdjacencyEntry>>>: Send,
RwLock<RawRwLock, HashMap<String, HashSet<EntityId>>>: Send,
RwLock<RawRwLock, HashMap<(IndexType, Option<String>), IndexStatus>>: Send,
RwLock<RawRwLock, Vec<IndexEvent>>: Send,
impl Sync for IntegratedIndexManagerwhere
RwLock<RawRwLock, BTreeMap<String, Vec<PostingEntry>>>: Sync,
RwLock<RawRwLock, usize>: Sync,
RwLock<RawRwLock, HashMap<String, HashSet<String>>>: Sync,
RwLock<RawRwLock, MetadataStorage>: Sync,
RwLock<RawRwLock, HashMap<String, HnswIndexInfo>>: Sync,
RwLock<RawRwLock, HashMap<EntityId, Vec<AdjacencyEntry>>>: Sync,
RwLock<RawRwLock, HashMap<String, HashSet<EntityId>>>: Sync,
RwLock<RawRwLock, HashMap<(IndexType, Option<String>), IndexStatus>>: Sync,
RwLock<RawRwLock, Vec<IndexEvent>>: Sync,
impl Unpin for IntegratedIndexManagerwhere
Align8<usize>: Unpin,
*const LeafNode<String, Vec<PostingEntry>> is !null: Unpin,
Box<(String, Vec<PostingEntry>)>: Unpin,
*const u8 is !null: Unpin,
*const LeafNode<(EntityId, String), bool> is !null: Unpin,
Box<((EntityId, String), bool)>: Unpin,
*const LeafNode<(EntityId, String), i64> is !null: Unpin,
Box<((EntityId, String), i64)>: Unpin,
*const LeafNode<(EntityId, String), f64> is !null: Unpin,
Box<((EntityId, String), f64)>: Unpin,
*const LeafNode<(EntityId, String), String> is !null: Unpin,
Box<((EntityId, String), String)>: Unpin,
*const LeafNode<(EntityId, String), Vec<u8>> is !null: Unpin,
Box<((EntityId, String), Vec<u8>)>: Unpin,
*const LeafNode<(EntityId, String), u64> is !null: Unpin,
Box<((EntityId, String), u64)>: Unpin,
impl UnsafeUnpin for IntegratedIndexManagerwhere
Align8<usize>: UnsafeUnpin,
*const LeafNode<String, Vec<PostingEntry>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Vec<PostingEntry>)>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, HashSet<String>)>: UnsafeUnpin,
*const LeafNode<(EntityId, String), bool> is !null: UnsafeUnpin,
PhantomData<Box<((EntityId, String), bool)>>: UnsafeUnpin,
*const LeafNode<(EntityId, String), i64> is !null: UnsafeUnpin,
PhantomData<Box<((EntityId, String), i64)>>: UnsafeUnpin,
*const LeafNode<(EntityId, String), f64> is !null: UnsafeUnpin,
PhantomData<Box<((EntityId, String), f64)>>: UnsafeUnpin,
*const LeafNode<(EntityId, String), String> is !null: UnsafeUnpin,
PhantomData<Box<((EntityId, String), String)>>: UnsafeUnpin,
*const LeafNode<(EntityId, String), Vec<u8>> is !null: UnsafeUnpin,
PhantomData<Box<((EntityId, String), Vec<u8>)>>: UnsafeUnpin,
*const LeafNode<(EntityId, String), u64> is !null: UnsafeUnpin,
PhantomData<Box<((EntityId, String), u64)>>: UnsafeUnpin,
PhantomData<((EntityId, String), MetadataValue)>: UnsafeUnpin,
PhantomData<(EntityId, HashSet<String>)>: UnsafeUnpin,
PhantomData<(String, HnswIndexInfo)>: UnsafeUnpin,
PhantomData<(EntityId, Vec<AdjacencyEntry>)>: UnsafeUnpin,
PhantomData<(String, HashSet<EntityId>)>: UnsafeUnpin,
PhantomData<((IndexType, Option<String>), IndexStatus)>: UnsafeUnpin,
PhantomData<IndexEvent>: UnsafeUnpin,
impl UnwindSafe for IntegratedIndexManagerwhere
Align8<usize>: UnwindSafe,
BTreeMap<String, Vec<PostingEntry>>: UnwindSafe,
HashMap<String, HashSet<String>>: UnwindSafe,
BTreeMap<(EntityId, String), bool>: UnwindSafe,
BTreeMap<(EntityId, String), i64>: UnwindSafe,
BTreeMap<(EntityId, String), f64>: UnwindSafe,
BTreeMap<(EntityId, String), String>: UnwindSafe,
BTreeMap<(EntityId, String), Vec<u8>>: UnwindSafe,
BTreeMap<(EntityId, String), u64>: UnwindSafe,
HashMap<(EntityId, String), MetadataValue>: UnwindSafe,
HashMap<EntityId, HashSet<String>>: UnwindSafe,
HashMap<String, HnswIndexInfo>: UnwindSafe,
HashMap<EntityId, Vec<AdjacencyEntry>>: UnwindSafe,
HashMap<String, HashSet<EntityId>>: UnwindSafe,
HashMap<(IndexType, Option<String>), IndexStatus>: UnwindSafe,
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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