@@ -483,11 +483,34 @@ describe.each([
483483
484484 test ( `${ permission } key: search without vectors` , async ( ) => {
485485 const client = await getClient ( permission ) ;
486- const response = await client . index ( index . uid ) . search ( 'prince' , { } ) ;
486+ const response = await client . index ( index . uid ) . searchGet ( 'prince' , { } ) ;
487487
488488 expect ( response ) . not . toHaveProperty ( 'semanticHitCount' ) ;
489489 } ) ;
490490
491+ test ( `${ permission } key: search with rankingScoreThreshold filter` , async ( ) => {
492+ const client = await getClient ( permission ) ;
493+
494+ const response = await client . index ( index . uid ) . searchGet ( 'prince' , {
495+ showRankingScore : true ,
496+ rankingScoreThreshold : 0.8 ,
497+ } ) ;
498+
499+ const hit = response . hits [ 0 ] ;
500+
501+ expect ( response ) . toHaveProperty ( 'hits' , expect . any ( Array ) ) ;
502+ expect ( response ) . toHaveProperty ( 'query' , 'prince' ) ;
503+ expect ( hit ) . toHaveProperty ( '_rankingScore' ) ;
504+ expect ( hit [ '_rankingScore' ] ) . toBeGreaterThanOrEqual ( 0.8 ) ;
505+
506+ const response2 = await client . index ( index . uid ) . search ( 'prince' , {
507+ showRankingScore : true ,
508+ rankingScoreThreshold : 0.9 ,
509+ } ) ;
510+
511+ expect ( response2 . hits . length ) . toBeLessThanOrEqual ( 0 ) ;
512+ } ) ;
513+
491514 test ( `${ permission } key: Try to search on deleted index and fail` , async ( ) => {
492515 const client = await getClient ( permission ) ;
493516 const masterClient = await getClient ( 'Master' ) ;
0 commit comments