File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,32 @@ impl Settings {
301301 }
302302 }
303303
304+ #[ must_use]
305+ pub fn with_max_values_per_facet (
306+ mut self ,
307+ max_values_per_facet : usize ,
308+ ) -> Settings {
309+ let mut faceting = self . faceting . take ( ) . unwrap_or_default ( ) ;
310+ faceting. max_values_per_facet = max_values_per_facet;
311+ Settings {
312+ faceting : Some ( faceting) ,
313+ ..self
314+ }
315+ }
316+
317+ #[ must_use]
318+ pub fn with_sort_facet_values_by (
319+ mut self ,
320+ sort_facet_values_by : BTreeMap < String , FacetSortValue > ,
321+ ) -> Settings {
322+ let mut faceting = self . faceting . take ( ) . unwrap_or_default ( ) ;
323+ faceting. sort_facet_values_by = Some ( sort_facet_values_by) ;
324+ Settings {
325+ faceting : Some ( faceting) ,
326+ ..self
327+ }
328+ }
329+
304330 #[ must_use]
305331 pub fn with_dictionary (
306332 self ,
You can’t perform that action at this time.
0 commit comments