From b12eb7a6bf4417471c7d0a82cc0227c69b152d91 Mon Sep 17 00:00:00 2001 From: Will Jones Date: Fri, 13 Oct 2023 11:30:37 -0700 Subject: [PATCH] be consistent about cloud behavior --- node/src/remote/index.ts | 4 ++++ python/lancedb/remote/table.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/node/src/remote/index.ts b/node/src/remote/index.ts index 4c6838dd..347f98b9 100644 --- a/node/src/remote/index.ts +++ b/node/src/remote/index.ts @@ -93,6 +93,10 @@ export class RemoteQuery extends Query { queryVector = query as number[] } + if ((this as any)._useIndex === false) { + throw new Error('LanceDB Cloud does not yet support useIndex=false') + } + const data = await this._client.search( this._name, queryVector, diff --git a/python/lancedb/remote/table.py b/python/lancedb/remote/table.py index 4a35f3af..25cc46e5 100644 --- a/python/lancedb/remote/table.py +++ b/python/lancedb/remote/table.py @@ -103,7 +103,7 @@ class RemoteTable(Table): raise NotImplementedError("Cloud support for prefiltering is coming soon") if not query.use_index: raise NotImplementedError( - "Cloud does not support non-indexed queries if the table has indices" + "LanceDB Cloud does not yet support use_index=False" ) result = self._conn._client.query(self._name, query) return self._conn._loop.run_until_complete(result).to_arrow()