mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-07 12:22:59 +00:00
chore: add one rust SDK e2e example (#876)
Co-authored-by: Chang She <759245+changhiskhan@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
sudo apt install -y protobuf-compiler libssl-dev
|
||||
```
|
||||
|
||||
|
||||
## How to connect to a database
|
||||
|
||||
=== "Python"
|
||||
@@ -70,10 +69,12 @@
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
let uri = "data/sample-lancedb";
|
||||
let db = connect(&uri).await?;
|
||||
let db = connect(uri).await?;
|
||||
}
|
||||
```
|
||||
|
||||
!!! info "See [examples/simple.rs](https://github.com/lancedb/lancedb/tree/main/rust/vectordb/src/examples/simple.rs) for a full working example."
|
||||
|
||||
LanceDB will create the directory if it doesn't exist (including parent directories).
|
||||
|
||||
If you need a reminder of the uri, you can call `db.uri()`.
|
||||
@@ -286,7 +287,7 @@ Once you've embedded the query, you can find its nearest neighbors using the fol
|
||||
```
|
||||
|
||||
By default, LanceDB runs a brute-force scan over dataset to find the K nearest neighbours (KNN).
|
||||
users can speed up the query by creating vector indices over the vector columns.
|
||||
For tables with more than 50K vectors, creating an ANN index is recommended to speed up search performance.
|
||||
|
||||
=== "Python"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user