Use pipeline (ingest) in Java Index/Update API


(Ilia Katz) #1

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


(David Pilato) #2

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


(Ilia Katz) #3

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)?


(Ilia Katz) #4

@dadoonet Is it possible to use UpdateRequest with pipeline?


(David Pilato) #5

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?


(Ilia Katz) #6

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


(David Pilato) #7

I see.

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


(Ilia Katz) #8

Done.
https://github.com/elastic/elasticsearch/issues/21903.


(system) #9

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