Use pipeline (ingest) in Java Index/Update API

Is it possible to use pipeline in Java Index/Update API?

I looked at the source and didn't find any mention of pipeline in Index/Update API.

Thanks

You have this method: https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java#L269-L272

1 Like

Thanks!

My bad, I checked the UpdateRequest and didn't find it there and assumed that the IndexRequest doesn't have it as well.

So... The IndexRequest and the UpdateByQueryRequest have the setPipeline method.

What about if I need to use UpdateRequest (that's the one I am using)?

@dadoonet Is it possible to use UpdateRequest with pipeline?

No and TBH I can't really find why you would use update API with pipelines.
Can you explain the use case?

May be it's related to ingest-attachment plugin?

I am using 'UpdateRequestBuilder' to create upsert requests that are part of a bulk request.

I see.

Can you open an issue asking for ingest support in the case of upsert?

Done.
Add ingest support for Java API upsert request · Issue #21903 · elastic/elasticsearch · GitHub.

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