File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1501,6 +1501,28 @@ mod tests {
15011501 Ok ( ( ) )
15021502 }
15031503
1504+ #[ meilisearch_test]
1505+ async fn test_facet_search_with_attributes_to_search_on ( client : Client , index : Index ) -> Result < ( ) , Error > {
1506+ setup_test_index ( & client, & index) . await ?;
1507+ let res = index
1508+ . facet_search ( "kind" )
1509+ . with_search_query ( "title" )
1510+ . with_attributes_to_search_on ( & [ "value" ] )
1511+ . execute ( )
1512+ . await ?;
1513+ println ! ( "{:?}" , res) ;
1514+ assert_eq ! ( res. facet_hits. len( ) , 0 ) ;
1515+
1516+ let res = index
1517+ . facet_search ( "kind" )
1518+ . with_search_query ( "title" )
1519+ . with_attributes_to_search_on ( & [ "kind" ] )
1520+ . execute ( )
1521+ . await ?;
1522+ assert_eq ! ( res. facet_hits. len( ) , 1 ) ;
1523+ Ok ( ( ) )
1524+ }
1525+
15041526 #[ meilisearch_test]
15051527 async fn test_facet_search_with_search_query (
15061528 client : Client ,
You can’t perform that action at this time.
0 commit comments