2
2
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
3
// See the LICENSE file in the project root for more information
4
4
5
+ using System . Collections . Generic ;
5
6
using System . Runtime . Serialization ;
6
7
using Elasticsearch . Net ;
7
8
using Nest . Utf8Json ;
@@ -15,28 +16,40 @@ public interface IIndicesOptions
15
16
[ DataMember ( Name = "allow_no_indices" ) ]
16
17
bool ? AllowNoIndices { get ; set ; }
17
18
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>
18
23
[ DataMember ( Name = "expand_wildcards" ) ]
19
- ExpandWildcards ? ExpandWildcards { get ; set ; }
24
+ [ JsonFormatter ( typeof ( ExpandWildcardsFormatter ) ) ]
25
+ IEnumerable < ExpandWildcards > ExpandWildcards { get ; set ; }
20
26
21
27
[ DataMember ( Name = "ignore_unavailable" ) ]
22
28
bool ? IgnoreUnavailable { get ; set ; }
23
29
}
24
30
25
31
[ DataContract ]
32
+
26
33
public class IndicesOptions : IIndicesOptions
27
34
{
28
35
public bool ? AllowNoIndices { get ; set ; }
29
- public ExpandWildcards ? ExpandWildcards { get ; set ; }
36
+ /// <inheritdoc />
37
+ public IEnumerable < ExpandWildcards > ExpandWildcards { get ; set ; }
30
38
public bool ? IgnoreUnavailable { get ; set ; }
31
39
}
32
40
33
41
public class IndicesOptionsDescriptor : DescriptorBase < IndicesOptionsDescriptor , IIndicesOptions > , IIndicesOptions
34
42
{
35
43
bool ? IIndicesOptions . AllowNoIndices { get ; set ; }
36
- ExpandWildcards ? IIndicesOptions . ExpandWildcards { get ; set ; }
44
+ IEnumerable < ExpandWildcards > IIndicesOptions . ExpandWildcards { get ; set ; }
37
45
bool ? IIndicesOptions . IgnoreUnavailable { get ; set ; }
38
46
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 ) =>
40
53
Assign ( expandWildcards , ( a , v ) => a . ExpandWildcards = v ) ;
41
54
42
55
public IndicesOptionsDescriptor IgnoreUnavailable ( bool ? ignoreUnavailable = true ) =>
0 commit comments