@@ -9,6 +9,7 @@ import weaviate, {
99 Tenant ,
1010 ReferenceCreator ,
1111} from '..' ;
12+ import { FusionType } from './hybrid' ;
1213
1314describe ( 'the graphql journey' , ( ) => {
1415 let client : WeaviateClient ;
@@ -372,6 +373,41 @@ describe('the graphql journey', () => {
372373 } ) ;
373374 } ) ;
374375
376+ test ( 'graphql get hybrid with query, alpha, properties and fushionType: rankedFusion' , ( ) => {
377+ return client . graphql
378+ . get ( )
379+ . withClassName ( 'Article' )
380+ . withHybrid ( { query : 'Apple' , properties : [ 'title' ] , alpha : 0 , fusionType : FusionType . rankedFusion } )
381+ . withFields ( '_additional { id }' )
382+ . do ( )
383+ . then ( ( res : any ) => {
384+ expect ( res . data . Get . Article . length ) . toBe ( 1 ) ;
385+ } )
386+ . catch ( ( e : any ) => {
387+ throw new Error ( 'it should not have errord' + e ) ;
388+ } ) ;
389+ } ) ;
390+
391+ test ( 'graphql get hybrid with query, alpha, properties and fushionType: relativeScoreFusion' , ( ) => {
392+ return client . graphql
393+ . get ( )
394+ . withClassName ( 'Article' )
395+ . withHybrid ( {
396+ query : 'Apple' ,
397+ properties : [ 'title' ] ,
398+ alpha : 0 ,
399+ fusionType : FusionType . relativeScoreFusion ,
400+ } )
401+ . withFields ( '_additional { id }' )
402+ . do ( )
403+ . then ( ( res : any ) => {
404+ expect ( res . data . Get . Article . length ) . toBe ( 1 ) ;
405+ } )
406+ . catch ( ( e : any ) => {
407+ throw new Error ( 'it should not have errord' + e ) ;
408+ } ) ;
409+ } ) ;
410+
375411 test ( 'graphql get with nearText (with certainty)' , ( ) => {
376412 return client . graphql
377413 . get ( )
0 commit comments