# Hot to represent pipeline in Java API for ingest-attachment?

**URL:** <https://discuss.elastic.co/t/hot-to-represent-pipeline-in-java-api-for-ingest-attachment/67551>\
**Category:** Elasticsearch\
**Created:** [November 29, 2016, 9:36pm UTC](https://discuss.elastic.co/t/hot-to-represent-pipeline-in-java-api-for-ingest-attachment/67551 "2016-11-29T21:36:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdaYang](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AdaYang](https://discuss.elastic.co/u/AdaYang)\
**Post date:** [November 29, 2016, 9:36pm UTC](https://discuss.elastic.co/t/hot-to-represent-pipeline-in-java-api-for-ingest-attachment/67551/1 "2016-11-29T21:36:25Z")

</div>

I was using mapper-attachments and index PDF documents using JAVA bulk load API. Now switching to Ingest-attachment. All I see from elasticsearch website is this example:

PUT my\_index/my\_type/my\_id?pipeline=attachment  
{  
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="  
}

I believe this should be done using the UpdateRequest(my-index, my-type, my-id) but not sure how to represent the portion (?pipeline=attachment) in this request?

Thanks,  
Ada

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 29, 2016, 9:48pm UTC](https://discuss.elastic.co/t/hot-to-represent-pipeline-in-java-api-for-ingest-attachment/67551/2 "2016-11-29T21:48:44Z")

</div>

Have a look at IndexRequest instead. It's not supported for UpdateRequest.  
BulkRequest also supports it.

---

<div class="post-metadata">

**Author:** ![AdaYang](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AdaYang](https://discuss.elastic.co/u/AdaYang)\
**Post date:** [November 29, 2016, 9:51pm UTC](https://discuss.elastic.co/t/hot-to-represent-pipeline-in-java-api-for-ingest-attachment/67551/3 "2016-11-29T21:51:04Z")

</div>

> [@dadoonet](#):
>
> IndexRequest

great... thank you very much for quick response... let me try

---

<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:** [December 27, 2016, 9:51pm UTC](https://discuss.elastic.co/t/hot-to-represent-pipeline-in-java-api-for-ingest-attachment/67551/4 "2016-12-27T21:51:04Z")

</div>

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