File tree Expand file tree Collapse file tree
crates/vector-store/src/vs_index Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ use crate::table::PrimaryId;
1919use crate :: table:: Table ;
2020use crate :: table:: TableSearch ;
2121use crate :: vs_index:: actor:: AnnR ;
22+ use crate :: vs_index:: actor:: CountR ;
2223use crate :: vs_index:: actor:: VsIndex ;
2324use crate :: vs_index:: factory:: VsIndexConfiguration ;
2425use crate :: vs_index:: validator;
@@ -164,8 +165,7 @@ fn new(
164165 ) ) ) ;
165166 }
166167 VsIndex :: Count { tx, .. } => {
167- _ = tx
168- . send ( Err ( anyhow:: anyhow!( "DiskANN index is not implemented yet" ) ) ) ;
168+ _ = tx. send ( state. count ( ) ) ;
169169 }
170170 }
171171 }
@@ -338,6 +338,10 @@ impl<T: TableSearch + Send + Sync + 'static> State<T> {
338338 ) ?;
339339 Ok ( ( primary_keys, distances) )
340340 }
341+
342+ fn count ( & self ) -> CountR {
343+ Ok ( self . epoch_map . len ( ) )
344+ }
341345}
342346
343347#[ hotpath:: measure]
You can’t perform that action at this time.
0 commit comments