@@ -1128,7 +1128,7 @@ def bulk(self, body, index=None, doc_type=None, params=None):
11281128 raise ValueError ("Empty value passed for a required argument 'body'." )
11291129 return self .transport .perform_request ('POST' , _make_path (index ,
11301130 doc_type , '_bulk' ), params = params , body = self ._bulk_body (body ),
1131- headers = {'Content-Type ' : 'application/x-ndjson' })
1131+ headers = {'content-type ' : 'application/x-ndjson' })
11321132
11331133 @query_params ('max_concurrent_searches' , 'pre_filter_shard_size' ,
11341134 'search_type' , 'typed_keys' )
@@ -1160,7 +1160,8 @@ def msearch(self, body, index=None, doc_type=None, params=None):
11601160 if body in SKIP_IN_PATH :
11611161 raise ValueError ("Empty value passed for a required argument 'body'." )
11621162 return self .transport .perform_request ('GET' , _make_path (index ,
1163- doc_type , '_msearch' ), params = params , body = self ._bulk_body (body ))
1163+ doc_type , '_msearch' ), params = params , body = self ._bulk_body (body ),
1164+ headers = {'content-type' : 'application/x-ndjson' })
11641165
11651166 @query_params ('field_statistics' , 'fields' , 'offsets' , 'parent' , 'payloads' ,
11661167 'positions' , 'preference' , 'realtime' , 'routing' , 'term_statistics' ,
@@ -1364,7 +1365,8 @@ def msearch_template(self, body, index=None, doc_type=None, params=None):
13641365 if body in SKIP_IN_PATH :
13651366 raise ValueError ("Empty value passed for a required argument 'body'." )
13661367 return self .transport .perform_request ('GET' , _make_path (index , doc_type ,
1367- '_msearch' , 'template' ), params = params , body = self ._bulk_body (body ))
1368+ '_msearch' , 'template' ), params = params , body = self ._bulk_body (body ),
1369+ headers = {'content-type' : 'application/x-ndjson' })
13681370
13691371 @query_params ('allow_no_indices' , 'expand_wildcards' , 'fields' ,
13701372 'ignore_unavailable' )
@@ -1388,3 +1390,4 @@ def field_caps(self, index=None, body=None, params=None):
13881390 """
13891391 return self .transport .perform_request ('GET' , _make_path (index ,
13901392 '_field_caps' ), params = params , body = body )
1393+
0 commit comments