From 7ae327242bcb8f85795da59c029f4a92f8467865 Mon Sep 17 00:00:00 2001 From: Cory Grinstead Date: Mon, 15 Jul 2024 18:20:23 -0500 Subject: [PATCH] docs: update `migration.md` (#1445) --- docs/mkdocs.yml | 4 ++-- docs/src/migration.md | 32 ++++++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 38c577d7..a11d5071 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -109,7 +109,7 @@ nav: - Filtering: sql.md - Versioning & Reproducibility: notebooks/reproducibility.ipynb - Configuring Storage: guides/storage.md - - Sync -> Async Migration Guide: migration.md + - Migration Guide: migration.md - Tuning retrieval performance: - Choosing right query type: guides/tuning_retrievers/1_query_types.md - Reranking: guides/tuning_retrievers/2_reranking.md @@ -194,7 +194,7 @@ nav: - Filtering: sql.md - Versioning & Reproducibility: notebooks/reproducibility.ipynb - Configuring Storage: guides/storage.md - - Sync -> Async Migration Guide: migration.md + - Migration Guide: migration.md - Tuning retrieval performance: - Choosing right query type: guides/tuning_retrievers/1_query_types.md - Reranking: guides/tuning_retrievers/2_reranking.md diff --git a/docs/src/migration.md b/docs/src/migration.md index 9b89a495..252e5d07 100644 --- a/docs/src/migration.md +++ b/docs/src/migration.md @@ -9,7 +9,8 @@ around the asynchronous client. This guide describes the differences between the two APIs and will hopefully assist users that would like to migrate to the new API. -## Closeable Connections +## Python +### Closeable Connections The Connection now has a `close` method. You can call this when you are done with the connection to eagerly free resources. Currently @@ -32,20 +33,20 @@ async def my_async_fn(): It is not mandatory to call the `close` method. If you do not call it then the connection will be closed when the object is garbage collected. -## Closeable Table +### Closeable Table The Table now also has a `close` method, similar to the connection. This can be used to eagerly free the cache used by a Table object. Similar to the connection, it can be used as a context manager and it is not mandatory to call the `close` method. -### Changes to Table APIs +#### Changes to Table APIs - Previously `Table.schema` was a property. Now it is an async method. - The method `Table.__len__` was removed and `len(table)` will no longer work. Use `Table.count_rows` instead. -### Creating Indices +#### Creating Indices The `Table.create_index` method is now used for creating both vector indices and scalar indices. It currently requires a column name to be specified (the @@ -55,12 +56,12 @@ the size of the data. To specify index configuration details you will need to specify which kind of index you are using. -### Querying +#### Querying The `Table.search` method has been renamed to `AsyncTable.vector_search` for clarity. -## Features not yet supported +### Features not yet supported The following features are not yet supported by the asynchronous API. However, we plan to support them soon. @@ -74,3 +75,22 @@ we plan to support them soon. search - Remote connections to LanceDb Cloud are not yet supported. - The method Table.head is not yet supported. + +## TypeScript/JavaScript + +For JS/TS users, we offer a brand new SDK [@lancedb/lancedb](https://www.npmjs.com/package/@lancedb/lancedb) + +### Changes to Table APIs + +Previously `Table.schema` was a property. Now it is an async method. + + +#### Creating Indices + +The `Table.createIndex` method is now used for creating both vector indices +and scalar indices. It currently requires a column name to be specified (the +column to index). Vector index defaults are now smarter and scale better with +the size of the data. + +To specify index configuration details you will need to specify which kind of +index you are using.