diff --git a/node/src/remote/client.ts b/node/src/remote/client.ts index 289f378b..f4185471 100644 --- a/node/src/remote/client.ts +++ b/node/src/remote/client.ts @@ -41,7 +41,7 @@ export class HttpLancedbClient { filter?: string ): Promise> { const response = await axios.post( - `${this._url}/v1/table/${tableName}`, + `${this._url}/v1/table/${tableName}/query/`, { vector, k, diff --git a/python/lancedb/remote/client.py b/python/lancedb/remote/client.py index 17edc2e4..02243e59 100644 --- a/python/lancedb/remote/client.py +++ b/python/lancedb/remote/client.py @@ -141,5 +141,7 @@ class RestfulLanceDBClient: @_check_not_closed async def query(self, table_name: str, query: VectorQuery) -> VectorQueryResult: """Query a table.""" - tbl = await self.post(f"/v1/table/{table_name}/", query, deserialize=_read_ipc) + tbl = await self.post( + f"/v1/table/{table_name}/query/", query, deserialize=_read_ipc + ) return VectorQueryResult(tbl) diff --git a/python/lancedb/remote/table.py b/python/lancedb/remote/table.py index 14e1818d..f0618527 100644 --- a/python/lancedb/remote/table.py +++ b/python/lancedb/remote/table.py @@ -33,13 +33,13 @@ class RemoteTable(Table): self._name = name def __repr__(self) -> str: - return f"RemoteTable({self._conn.db_name}.{self.name})" + return f"RemoteTable({self._conn.db_name}.{self._name})" @cached_property def schema(self) -> pa.Schema: """Return the schema of the table.""" resp = self._conn._loop.run_until_complete( - self._conn._client.get(f"/v1/table/{self._name}/describe") + self._conn._client.post(f"/v1/table/{self._name}/describe/") ) schema = json_to_schema(resp["schema"]) return schema @@ -73,7 +73,7 @@ class RemoteTable(Table): self._conn._loop.run_until_complete( self._conn._client.post( - f"/v1/table/{self._name}/insert", + f"/v1/table/{self._name}/insert/", data=payload, params={"request_id": request_id, "mode": mode}, content_type=ARROW_STREAM_CONTENT_TYPE,