I am using ES Java API to talk to an ES server. Sometimes I need to index a
single doc, sometimes dozens or hundreds at a time. I'd prefer to keep my
code simple (am a contrarian thinker) and wonder if I can get away with
always using bulk API (ie BulkRequestBuilder). so that my interface to ES
would look like so:
...but impl would always delegate to BulkRequestBuilder - with number of
actions sometimes being ~ 1.
Is there a performance (or other) downside to this approach. Specifically,
would bulk index updates (with set of size == 1) take significantly longer
than non-bulk updates?
I am using ES Java API to talk to an ES server. Sometimes I need to index
a single doc, sometimes dozens or hundreds at a time. I'd prefer to keep my
code simple (am a contrarian thinker) and wonder if I can get away with
always using bulk API (ie BulkRequestBuilder). so that my interface to ES
would look like so:
...but impl would always delegate to BulkRequestBuilder - with number of
actions sometimes being ~ 1.
Is there a performance (or other) downside to this approach. Specifically,
would bulk index updates (with set of size == 1) take significantly longer
than non-bulk updates?
I am using ES Java API to talk to an ES server. Sometimes I need to index
a single doc, sometimes dozens or hundreds at a time. I'd prefer to keep my
code simple (am a contrarian thinker) and wonder if I can get away with
always using bulk API (ie BulkRequestBuilder). so that my interface to ES
would look like so:
...but impl would always delegate to BulkRequestBuilder - with number of
actions sometimes being ~ 1.
Is there a performance (or other) downside to this approach.
Specifically, would bulk index updates (with set of size == 1) take
significantly longer than non-bulk updates?
Yes, the difference is not noticeable. Bulk requests have an extra logic
for shard splitting, with a single index request, there is no overhead at
all.
I am using ES Java API to talk to an ES server. Sometimes I need to
index a single doc, sometimes dozens or hundreds at a time. I'd prefer to
keep my code simple (am a contrarian thinker) and wonder if I can get away
with always using bulk API (ie BulkRequestBuilder). so that my interface to
ES would look like so:
...but impl would always delegate to BulkRequestBuilder - with number of
actions sometimes being ~ 1.
Is there a performance (or other) downside to this approach.
Specifically, would bulk index updates (with set of size == 1) take
significantly longer than non-bulk updates?
Yes, the difference is not noticeable. Bulk requests have an extra logic
for shard splitting, with a single index request, there is no overhead at
all.
I am using ES Java API to talk to an ES server. Sometimes I need to
index a single doc, sometimes dozens or hundreds at a time. I'd prefer to
keep my code simple (am a contrarian thinker) and wonder if I can get away
with always using bulk API (ie BulkRequestBuilder). so that my interface to
ES would look like so:
...but impl would always delegate to BulkRequestBuilder - with number
of actions sometimes being ~ 1.
Is there a performance (or other) downside to this approach.
Specifically, would bulk index updates (with set of size == 1) take
significantly longer than non-bulk updates?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.