Skip to content

Commit 5c658fc

Browse files
committed
Allow pipeline as a parameter in bulk actions
Fixes elastic#564
1 parent c318f7f commit 5c658fc

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
Changelog
44
=========
55

6+
5.4.0 (dev)
7+
-----------
8+
9+
* ``bulk`` helpers now extract ``pipeline`` parameter from the action
10+
dictionary.
11+
612
5.3.0 (2017-03-30)
713
------------------
814

docs/helpers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ in several formats. The most common one is the same as returned by
2929
'_type': 'document',
3030
'_id': 42,
3131
'_parent': 5,
32-
'_ttl': '1d',
32+
'pipeline': 'my-ingest-pipeline',
3333
'_source': {
3434
"title": "Hello World!",
3535
"body": "..."

elasticsearch/helpers/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def expand_action(data):
3535
op_type = data.pop('_op_type', 'index')
3636
action = {op_type: {}}
3737
for key in ('_index', '_parent', '_percolate', '_routing', '_timestamp',
38-
'_ttl', '_type', '_version', '_version_type', '_id', '_retry_on_conflict'):
38+
'_type', '_version', '_version_type', '_id',
39+
'_retry_on_conflict', 'pipeline'):
3940
if key in data:
4041
action[op_type][key] = data.pop(key)
4142

0 commit comments

Comments
 (0)