@@ -733,6 +733,12 @@ pub struct FacetSearchQuery<'a, Http: HttpClient = DefaultHttpClient> {
733733 /// Defines the strategy on how to handle search queries containing multiple words.
734734 #[ serde( skip_serializing_if = "Option::is_none" ) ]
735735 pub matching_strategy : Option < MatchingStrategies > ,
736+ /// Restrict search to the specified attributes
737+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
738+ pub attributes_to_search_on : Option < & ' a [ & ' a str ] > ,
739+ /// Return an exhaustive count of facets, up to the limit defined by maxTotalHits. Default is false.
740+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
741+ pub max_total_hits : Option < usize > ,
736742}
737743
738744#[ allow( missing_docs) ]
@@ -745,6 +751,8 @@ impl<'a, Http: HttpClient> FacetSearchQuery<'a, Http> {
745751 search_query : None ,
746752 filter : None ,
747753 matching_strategy : None ,
754+ attributes_to_search_on : None ,
755+ max_total_hits : None ,
748756 }
749757 }
750758
@@ -785,6 +793,22 @@ impl<'a, Http: HttpClient> FacetSearchQuery<'a, Http> {
785793 self
786794 }
787795
796+ pub fn with_attributes_to_search_on < ' b > (
797+ & ' b mut self ,
798+ attributes_to_search_on : & ' a [ & ' a str ] ,
799+ ) -> & ' b mut FacetSearchQuery < ' a , Http > {
800+ self . attributes_to_search_on = Some ( attributes_to_search_on) ;
801+ self
802+ }
803+
804+ pub fn with_max_total_hits < ' b > (
805+ & ' b mut self ,
806+ max_total_hits : usize ,
807+ ) -> & ' b mut FacetSearchQuery < ' a , Http > {
808+ self . max_total_hits = Some ( max_total_hits) ;
809+ self
810+ }
811+
788812 pub fn build ( & mut self ) -> FacetSearchQuery < ' a , Http > {
789813 self . clone ( )
790814 }
0 commit comments