@@ -99,6 +99,16 @@ public static IndexOptionsBuilder SetName(string value)
99
99
return new IndexOptionsBuilder ( ) . SetName ( value ) ;
100
100
}
101
101
102
+ /// <summary>
103
+ /// Sets the partial filter expression.
104
+ /// </summary>
105
+ /// <param name="value">The value.</param>
106
+ /// <returns>The builder (so method calls can be chained).</returns>
107
+ public static IndexOptionsBuilder SetPartialFilterExpression ( IMongoQuery value )
108
+ {
109
+ return new IndexOptionsBuilder ( ) . SetPartialFilterExpression ( value ) ;
110
+ }
111
+
102
112
/// <summary>
103
113
/// Sets whether the index is a sparse index.
104
114
/// </summary>
@@ -260,6 +270,17 @@ public IndexOptionsBuilder SetName(string value)
260
270
return this ;
261
271
}
262
272
273
+ /// <summary>
274
+ /// Sets the partial filter expression.
275
+ /// </summary>
276
+ /// <param name="value">The value.</param>
277
+ /// <returns>The builder (so method calls can be chained).</returns>
278
+ public IndexOptionsBuilder SetPartialFilterExpression ( IMongoQuery value )
279
+ {
280
+ _document [ "partialFilterExpression" ] = value . ToBsonDocument ( ) ;
281
+ return this ;
282
+ }
283
+
263
284
/// <summary>
264
285
/// Sets whether the index is a sparse index.
265
286
/// </summary>
@@ -445,6 +466,16 @@ public static IndexOptionsBuilder<TDocument> SetName(string value)
445
466
return new IndexOptionsBuilder < TDocument > ( ) . SetName ( value ) ;
446
467
}
447
468
469
+ /// <summary>
470
+ /// Sets the partial filter expression.
471
+ /// </summary>
472
+ /// <param name="value">The value.</param>
473
+ /// <returns>The builder (so method calls can be chained).</returns>
474
+ public static IndexOptionsBuilder < TDocument > SetPartialFilterExpression ( IMongoQuery value )
475
+ {
476
+ return new IndexOptionsBuilder < TDocument > ( ) . SetPartialFilterExpression ( value ) ;
477
+ }
478
+
448
479
/// <summary>
449
480
/// Sets whether the index is a sparse index.
450
481
/// </summary>
@@ -611,6 +642,17 @@ public IndexOptionsBuilder<TDocument> SetName(string value)
611
642
return this ;
612
643
}
613
644
645
+ /// <summary>
646
+ /// Sets the partial filter expression.
647
+ /// </summary>
648
+ /// <param name="value">The value.</param>
649
+ /// <returns>The builder (so method calls can be chained).</returns>
650
+ public IndexOptionsBuilder < TDocument > SetPartialFilterExpression ( IMongoQuery value )
651
+ {
652
+ _indexOptionsBuilder . SetPartialFilterExpression ( value ) ;
653
+ return this ;
654
+ }
655
+
614
656
/// <summary>
615
657
/// Sets whether the index is a sparse index.
616
658
/// </summary>
0 commit comments