@@ -350,7 +350,7 @@ describe.each([
350350 } )
351351 } )
352352
353- test ( `${ permission } key: Search with facetFilters and facetDistribution ` , async ( ) => {
353+ test ( `${ permission } key: Search with facetFilters and facetsDistribution ` , async ( ) => {
354354 await client
355355 . getIndex < Movie > ( index . uid )
356356 . search (
@@ -408,6 +408,44 @@ describe.each([
408408 } )
409409 } )
410410
411+ test ( `${ permission } key: ${ method } search with multiple facetFilters and placeholder search` , async ( ) => {
412+ await client
413+ . getIndex < Movie > ( index . uid )
414+ . search (
415+ undefined ,
416+ {
417+ facetFilters : [ 'genre:fantasy' ] ,
418+ facetsDistribution : [ 'genre' ] ,
419+ } ,
420+ method
421+ )
422+ . then ( ( response ) => {
423+ expect ( response ) . toHaveProperty ( 'facetsDistribution' , {
424+ genre : { adventure : 0 , fantasy : 2 , romance : 0 , 'sci fi' : 0 } ,
425+ } )
426+ expect ( response . hits . length ) . toEqual ( 2 )
427+ } )
428+ } )
429+
430+ test ( `${ permission } key: ${ method } search with multiple facetFilters and placeholder search` , async ( ) => {
431+ await client
432+ . getIndex < Movie > ( index . uid )
433+ . search (
434+ null ,
435+ {
436+ facetFilters : [ 'genre:fantasy' ] ,
437+ facetsDistribution : [ 'genre' ] ,
438+ } ,
439+ method
440+ )
441+ . then ( ( response ) => {
442+ expect ( response ) . toHaveProperty ( 'facetsDistribution' , {
443+ genre : { adventure : 0 , fantasy : 2 , romance : 0 , 'sci fi' : 0 } ,
444+ } )
445+ expect ( response . hits . length ) . toEqual ( 2 )
446+ } )
447+ } )
448+
411449 test ( `${ permission } key: Search on index with no documents and no primary key` , async ( ) => {
412450 await client
413451 . getIndex ( emptyIndex . uid )
0 commit comments