You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`storage_options` (`dict[str, Any]`, optional): Passed through to LanceDB when connecting.
140
+
141
+
Additional notes:
142
+
143
+
* Exactly one primary key field is required for LanceDB targets. We create B-Tree index on this key column.
144
+
145
+
:::info
146
+
147
+
LanceDB has a limitation that it cannot build a vector index on an empty table (see [LanceDB issue #4034](https://github.com/lancedb/lance/issues/4034)).
148
+
If you want to use vector indexes, you can run the flow once to populate the target table with data, and then create the vector indexes.
149
+
150
+
:::
151
+
152
+
You can find an end-to-end example here: [examples/text_embedding_lancedb](https://github.com/cocoindex-io/cocoindex/tree/main/examples/text_embedding_lancedb).
153
+
154
+
#### `connect_async()` helper
155
+
156
+
We provide a helper to obtain a shared `AsyncConnection` that is reused across your process and shared with CocoIndex's writer for strong read-after-write consistency:
157
+
158
+
```python
159
+
from cocoindex.targets import lancedb as coco_lancedb
160
+
161
+
db =await coco_lancedb.connect_async("./lancedb_data")
0 commit comments