| 
1 | 1 | /* eslint-disable @typescript-eslint/no-non-null-assertion */  | 
2 | 2 | /* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */  | 
 | 3 | +import { requireAtLeast } from '../../../test/version.js';  | 
3 | 4 | import { WeaviateQueryError, WeaviateUnsupportedFeatureError } from '../../errors.js';  | 
4 |  | -import weaviate, { AggregateText, WeaviateClient } from '../../index.js';  | 
 | 5 | +import weaviate, { AggregateText, Bm25Operator, WeaviateClient } from '../../index.js';  | 
5 | 6 | import { Collection } from '../collection/index.js';  | 
6 | 7 | import { CrossReference } from '../references/index.js';  | 
7 | 8 | import { DataObject } from '../types/index.js';  | 
@@ -448,6 +449,16 @@ describe('Testing of collection.aggregate search methods', () => {  | 
448 | 449 |     expect(result.totalCount).toBeGreaterThan(0);  | 
449 | 450 |   });  | 
450 | 451 | 
 
  | 
 | 452 | +  requireAtLeast(1, 31, 0).it('bm25 search operator with hybrid', async () => {  | 
 | 453 | +    const result = await collection.aggregate.hybrid('test', {  | 
 | 454 | +      bm25Operator: Bm25Operator.and(),  | 
 | 455 | +      maxVectorDistance: 1,  | 
 | 456 | +      queryProperties: ['text'],  | 
 | 457 | +      returnMetrics: collection.metrics.aggregate('text').text(['count']),  | 
 | 458 | +    });  | 
 | 459 | +    expect(result.totalCount).toBeGreaterThan(0);  | 
 | 460 | +  });  | 
 | 461 | + | 
451 | 462 |   it('should return a grouped aggregation on a hybrid search', async () => {  | 
452 | 463 |     if (await client.getWeaviateVersion().then((ver) => ver.isLowerThan(1, 25, 0))) {  | 
453 | 464 |       console.warn('Skipping test as there is a bug with this in 1.24.26 that will not be fixed');  | 
 | 
0 commit comments