File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
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- Self . RequestParameters . AddQueryString ( "types" , completion_fields ) ;
56+ ( ( IIndicesStatsRequest ) this ) . Types = completion_fields ;
5757 return this ;
5858 }
5959
@@ -65,6 +65,13 @@ 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 ( ) )
71+ {
72+ var inferrer = new ElasticInferrer ( settings ) ;
73+ pathInfo . RequestParameters . AddQueryString ( "types" , inferrer . TypeNames ( typeNameMarkers ) ) ;
74+ }
6875 IndicesStatsPathInfo . Update ( settings , pathInfo , this ) ;
6976 }
7077 }
You can’t perform that action at this time.
0 commit comments