Difference between create in bulk API and simple create API in loop with elasticsearch


(Rahul Garg) #1

I want to know what is the difference between if i create 20 records with bulk API and if i create 20 records with create API with elasticsearch.

Few questions:

  1. Does the index will updated only once in case of bulk API?
  2. Does the performance will be more in case of Bulk API?

(Mark Walkom) #2

You only need one network round trip, not 20, that's the big thing.


(Imran Siddique) #3

Internally w.r.t. segment creation, the # of requests coming directly or in bulk will not create a difference. Lucene will treat even bulk indexed requests individually.

Does the performance will be more in case of Bulk API?
yes, since you avoid the network round trips


(system) #4