Skip to content

Commit 7e51252

Browse files
authored
Merge pull request #61 from stackhpc/remaining-opensearch-fix
Remove mapping name from bulk API URL
2 parents b106bb3 + 15e5da5 commit 7e51252

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cloudkitty/storage/v2/elasticsearch/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def bulk_with_instruction(self, instruction, terms):
225225
"""Does a POST request against ES's bulk API
226226
227227
The POST request will be done against
228-
`/<index_name>/<mapping_name>/_bulk`
228+
`/<index_name>/_bulk`
229229
230230
The instruction will be appended before each term. For example,
231231
bulk_with_instruction('instr', ['one', 'two']) will produce::
@@ -246,7 +246,7 @@ def bulk_with_instruction(self, instruction, terms):
246246
*[(instruction, json.dumps(term)) for term in terms]
247247
)) + '\n'
248248
url = '/'.join(
249-
(self._url, self._index_name, self._mapping_name, '_bulk'))
249+
(self._url, self._index_name, '_bulk'))
250250
return self._req(self._sess.post, url, data, None, deserialize=False)
251251

252252
def bulk_index(self, terms):

cloudkitty/tests/storage/v2/elasticsearch/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def test_bulk_with_instruction(self):
259259
self.client.bulk_with_instruction(instruction, terms)
260260
rmock.assert_called_once_with(
261261
self.client._sess.post,
262-
'http://elasticsearch:9200/index_name/test_mapping/_bulk',
262+
'http://elasticsearch:9200/index_name/_bulk',
263263
expected_data, None, deserialize=False)
264264

265265
def test_bulk_index(self):

0 commit comments

Comments
 (0)