22// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33// See the LICENSE file in the project root for more information
44
5+ using System . Collections . Generic ;
56using System . Runtime . Serialization ;
67using Elasticsearch . Net ;
78using Elasticsearch . Net . Utf8Json ;
@@ -15,28 +16,40 @@ public interface IIndicesOptions
1516 [ DataMember ( Name = "allow_no_indices" ) ]
1617 bool ? AllowNoIndices { get ; set ; }
1718
19+ /// <summary>
20+ /// Determines how to expand indices wildcards.
21+ /// <para>NOTE: Elasticsearch 7.10.0 and prior supports only a single value. Elasticsearch 7.10.1 and later support multiple values.</para>
22+ /// </summary>
1823 [ DataMember ( Name = "expand_wildcards" ) ]
19- ExpandWildcards ? ExpandWildcards { get ; set ; }
24+ [ JsonFormatter ( typeof ( ExpandWildcardsFormatter ) ) ]
25+ IEnumerable < ExpandWildcards > ExpandWildcards { get ; set ; }
2026
2127 [ DataMember ( Name = "ignore_unavailable" ) ]
2228 bool ? IgnoreUnavailable { get ; set ; }
2329 }
2430
2531 [ DataContract ]
32+
2633 public class IndicesOptions : IIndicesOptions
2734 {
2835 public bool ? AllowNoIndices { get ; set ; }
29- public ExpandWildcards ? ExpandWildcards { get ; set ; }
36+ /// <inheritdoc />
37+ public IEnumerable < ExpandWildcards > ExpandWildcards { get ; set ; }
3038 public bool ? IgnoreUnavailable { get ; set ; }
3139 }
3240
3341 public class IndicesOptionsDescriptor : DescriptorBase < IndicesOptionsDescriptor , IIndicesOptions > , IIndicesOptions
3442 {
3543 bool ? IIndicesOptions . AllowNoIndices { get ; set ; }
36- ExpandWildcards ? IIndicesOptions . ExpandWildcards { get ; set ; }
44+ IEnumerable < ExpandWildcards > IIndicesOptions . ExpandWildcards { get ; set ; }
3745 bool ? IIndicesOptions . IgnoreUnavailable { get ; set ; }
3846
39- public IndicesOptionsDescriptor ExpandWildcards ( ExpandWildcards ? expandWildcards ) =>
47+ /// <inheritdoc cref="IIndicesOptions.ExpandWildcards"/>
48+ public IndicesOptionsDescriptor ExpandWildcards ( IEnumerable < ExpandWildcards > expandWildcards ) =>
49+ Assign ( expandWildcards , ( a , v ) => a . ExpandWildcards = v ) ;
50+
51+ /// <inheritdoc cref="IIndicesOptions.ExpandWildcards"/>
52+ public IndicesOptionsDescriptor ExpandWildcards ( params ExpandWildcards [ ] expandWildcards ) =>
4053 Assign ( expandWildcards , ( a , v ) => a . ExpandWildcards = v ) ;
4154
4255 public IndicesOptionsDescriptor IgnoreUnavailable ( bool ? ignoreUnavailable = true ) =>
0 commit comments