feat: improve the rust table query API and documents (#860)

* Easy to type
* Handle `String, &str, [String] and [&str]` well without manual
conversion
* Fix function name to be verb
* Improve docstring of Rust.
* Promote `query` and `search()` to public `Table` trait
This commit is contained in:
Lei Xu
2024-01-25 10:44:31 -08:00
committed by Weston Pace
parent 68e2bb0b2d
commit 8b04d8fef6
8 changed files with 292 additions and 191 deletions

View File

@@ -33,7 +33,7 @@ impl Query {
#[napi]
pub fn vector(&mut self, vector: Float32Array) {
let inn = self.inner.clone().query_vector(&vector);
let inn = self.inner.clone().nearest_to(&vector);
self.inner = inn;
}