File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public partial class IndicesStatsDescriptor : IndicesOptionalPathDescriptor<Indi
5353 //<summary>A comma-separated list of fields for `completion` metric (supports wildcards)</summary>
5454 public IndicesStatsDescriptor Types ( params TypeNameMarker [ ] completion_fields )
5555 {
56- ( ( IIndicesStatsRequest ) this ) . Types = completion_fields ;
56+ Self . Types = completion_fields ;
5757 return this ;
5858 }
5959
@@ -65,12 +65,14 @@ public IndicesStatsDescriptor Metrics(params IndicesStatsMetric[] metrics)
6565
6666 protected override void UpdatePathInfo ( IConnectionSettingsValues settings , ElasticsearchPathInfo < IndicesStatsRequestParameters > pathInfo )
6767 {
68- var types = ( ( IIndicesStatsRequest ) this ) . Types ;
69- var typeNameMarkers = types as TypeNameMarker [ ] ?? types . ToArray ( ) ;
70- if ( typeNameMarkers . HasAny ( ) )
68+ if ( Self . Types != null )
7169 {
72- var inferrer = new ElasticInferrer ( settings ) ;
73- pathInfo . RequestParameters . AddQueryString ( "types" , inferrer . TypeNames ( typeNameMarkers ) ) ;
70+ var typeNameMarkers = Self . Types as TypeNameMarker [ ] ?? Self . Types . ToArray ( ) ;
71+ if ( typeNameMarkers . HasAny ( ) )
72+ {
73+ var inferrer = new ElasticInferrer ( settings ) ;
74+ pathInfo . RequestParameters . AddQueryString ( "types" , inferrer . TypeNames ( typeNameMarkers ) ) ;
75+ }
7476 }
7577 IndicesStatsPathInfo . Update ( settings , pathInfo , this ) ;
7678 }
You can’t perform that action at this time.
0 commit comments