From ae2a335b7dc00978bc23bee45aabb1f43936ecb2 Mon Sep 17 00:00:00 2001 From: Tommy Smith Date: Tue, 10 Jun 2025 14:18:44 +0100 Subject: [PATCH] Export filter namespace from weaviate root without generics support --- src/collections/filters/integration.test.ts | 2 +- src/index.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/collections/filters/integration.test.ts b/src/collections/filters/integration.test.ts index d4a72d05..b634fc20 100644 --- a/src/collections/filters/integration.test.ts +++ b/src/collections/filters/integration.test.ts @@ -112,7 +112,7 @@ describe('Testing of the filter class with a simple collection', () => { it('should filter a fetch objects query with a single filter and non-generic collection', async () => { const res = await client.collections.use(collectionName).query.fetchObjects({ - filters: client.collections.use(collectionName).filter.byProperty('text').equal('two'), + filters: weaviate.filter.byProperty('text').equal('two'), }); expect(res.objects.length).toEqual(1); const obj = res.objects[0]; diff --git a/src/index.ts b/src/index.ts index 775d5f1f..43bb1ac5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -38,6 +38,7 @@ import { LiveChecker, OpenidConfigurationGetter, ReadyChecker } from './misc/ind import weaviateV2 from './v2/index.js'; +import filter from './collections/filters/index.js'; import { ConsistencyLevel } from './data/replication.js'; import users, { Users } from './users/index.js'; @@ -254,6 +255,7 @@ const app = { AuthClientCredentials, configure, configGuards, + filter: filter(), reconfigure, permissions, };