Adding _source field to IndexResponse


(Peter Leondires) #1

Is there a way in the java API to customize the returned IndexResponse (And indexresponses within a BulkResponse) such that the response contains one of the _source fields?

Based on the response here Get certain fields in bulk API response it seems like it should be possible, but I was unable to determine how.


(David Pilato) #2

I don't believe you can OOTB.
As mentioned in the thread you linked to, it's easier to call the GET API after that?

Wondering why do you need that after all? Actually you are sending the document you want to index, right? Why reading that again?
Does it relate somehow with ingest node processing?


(Nik Everett) #3

Calling get right after an index in 5.0 is going to cause a refresh to support the realtime get which is probably not a good thing to do consistently.


(David Pilato) #4

Very true! I forgot about this one! :slight_smile: Thanks Nik!


(system) #5

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