# BulkIngester index operation does not propagate pipeline if defined

**URL:** <https://discuss.elastic.co/t/bulkingester-index-operation-does-not-propagate-pipeline-if-defined/338781>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [July 19, 2023, 11:45am UTC](https://discuss.elastic.co/t/bulkingester-index-operation-does-not-propagate-pipeline-if-defined/338781 "2023-07-19T11:45:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ng.software.dev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ng.software.dev/32/70692_2.png) [@ng.software.dev](https://discuss.elastic.co/u/ng.software.dev)\
**Post date:** [July 19, 2023, 11:45am UTC](https://discuss.elastic.co/t/bulkingester-index-operation-does-not-propagate-pipeline-if-defined/338781/1 "2023-07-19T11:45:24Z")

</div>

I am using the `BulkIngester` utility in the Java API to stream index request to Elasticsearch.

Consider the following snippet of code:

```auto
bulkIngester.add(o -> o.index(i -> i
    .pipeline(pipeline)
    .index(index)
    .id(ingestMessage.getId())
    .document(ingestMessage.getDoc())));

```

where `pipeline` is defined and corrsponds to an existing ingest pipeline.

Upon execution the documents don't go through the ingest pipeline.

The equivalent REST API request works as expected though:

```auto
POST _bulk
{ "index" : { "_index" : "test", "_id" : "1", "pipeline": "my-pipeline" } }
{ "title": "Test 1", "body": "test" }

```

I believe this is a bug, but before I submit a report, maybe someone already ran into this issue?

---

<div class="post-metadata">

**Author:** ![swallez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swallez/32/11972_2.png) [@swallez](https://discuss.elastic.co/u/swallez)\
**Post date:** [July 19, 2023, 2:03pm UTC](https://discuss.elastic.co/t/bulkingester-index-operation-does-not-propagate-pipeline-if-defined/338781/2 "2023-07-19T14:03:44Z")

</div>

It has been fixed in [Add pipeline setup to index and create operations by renatogm24 · Pull Request #587 · elastic/elasticsearch-java · GitHub](https://github.com/elastic/elasticsearch-java/pull/587) and is part of version 8.9.0 that should be released in the coming days.

---

<div class="post-metadata">

**Author:** ![ng.software.dev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ng.software.dev/32/70692_2.png) [@ng.software.dev](https://discuss.elastic.co/u/ng.software.dev)\
**Post date:** [July 19, 2023, 2:22pm UTC](https://discuss.elastic.co/t/bulkingester-index-operation-does-not-propagate-pipeline-if-defined/338781/3 "2023-07-19T14:22:59Z")

</div>

Wow that's quite worrysome to have such a bug in an API supposed to be production-ready...

Thanks for the reply though 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 16, 2023, 2:23pm UTC](https://discuss.elastic.co/t/bulkingester-index-operation-does-not-propagate-pipeline-if-defined/338781/4 "2023-08-16T14:23:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
