BulkRequestBuilder is slow

I am trying to index and remove some document in the index
using BulkRequestBuilder java api. When I execute the bulk the changes in
the index is not happening immediately. If I do some delete operation using
the bulk after quite long time the data is getting deleted from the index.
Is there any property to be set to make the changes get reflected in the
index immediately after the bulk execution.

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hey,

the refresh API might help you in this case after you finished indexing...
however unless you changed your configuration, a 'quite long time' should
be very short...

On Wed, Apr 3, 2013 at 8:10 AM, muzammil.abdul@enhancesys.com wrote:

I am trying to index and remove some document in the index
using BulkRequestBuilder java api. When I execute the bulk the changes in
the index is not happening immediately. If I do some delete operation using
the bulk after quite long time the data is getting deleted from the index.
Is there any property to be set to make the changes get reflected in the
index immediately after the bulk execution.

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks for ur reply Mr.Alexander Reelsen. Any how I had
set setRefresh(true) to my bulkRequestBuilder after setting this I was able
to search for the documents that I had indexed using the bulk but the the
documents which I had deleted using the bulk remains unchanged

I am using elasticSearch 19.8 - Java api

With regards
Muzammil A

On Wednesday, April 3, 2013 11:50:46 AM UTC+5:30, Alexander Reelsen wrote:

Hey,

the refresh API might help you in this case after you finished indexing...
however unless you changed your configuration, a 'quite long time' should
be very short...
Elasticsearch Platform — Find real-time answers at scale | Elastic

On Wed, Apr 3, 2013 at 8:10 AM, <muzammi...@enhancesys.com <javascript:>>wrote:

I am trying to index and remove some document in the index
using BulkRequestBuilder java api. When I execute the bulk the changes in
the index is not happening immediately. If I do some delete operation using
the bulk after quite long time the data is getting deleted from the index.
Is there any property to be set to make the changes get reflected in the
index immediately after the bulk execution.

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Document deletes just mark documents as deleted until next segment
merge. To enforce visibility of deleted documents to all index readers,
you must optimize the index (to trigger a segment merge). Note, using
refresh/optimize is very harmful to performance.

Jörg

Am 03.04.13 08:28, schrieb muzammil.abdul@enhancesys.com:

Any how I had set setRefresh(true) to my bulkRequestBuilder after
setting this I was able to search for the documents that I had indexed
using the bulk but the the documents which I had deleted using the
bulk remains unchanged

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Jorg Prante,

You mean than I need to do the following coding

OptimizeRequest optimize = new OptimizeRequest();
optimize.waitForMerge(false);
client.admin().indices().optimize(optimize);

I just want to know that I am doing it right.

On Wed, Apr 3, 2013 at 1:16 PM, Jörg Prante joergprante@gmail.com wrote:

Document deletes just mark documents as deleted until next segment merge.
To enforce visibility of deleted documents to all index readers, you must
optimize the index (to trigger a segment merge). Note, using
refresh/optimize is very harmful to performance.

Jörg

Am 03.04.13 08:28, schrieb muzammil.abdul@enhancesys.com:

Any how I had set setRefresh(true) to my bulkRequestBuilder after setting

this I was able to search for the documents that I had indexed using the
bulk but the the documents which I had deleted using the bulk remains
unchanged

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/**
topic/elasticsearch/**n5rJuEtVQtA/unsubscribe?hl=en-**UShttps://groups.google.com/d/topic/elasticsearch/n5rJuEtVQtA/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@**googlegroups.comelasticsearch%2Bunsubscribe@googlegroups.com
.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You must wait for delete expunges if you want to be sure each delete has
been executed.

     OptimizeRequest request = new 

OptimizeRequest().onlyExpungeDeletes(true).waitForMerge(true);
client.admin().indices().optimize(request).actionGet();

Note, I strongly recommend against using this feature for each document
you delete unless you know that you are destroying all the performance
ES can offer.

Jörg

Am 03.04.13 11:03, schrieb Muzammil A:

Hi Jorg Prante,

You mean than I need to do the following coding

OptimizeRequest optimize = new OptimizeRequest();
optimize.waitForMerge(false);
client.admin().indices().optimize(optimize);

I just want to know that I am doing it right.

On Wed, Apr 3, 2013 at 1:16 PM, Jörg Prante <joergprante@gmail.com
mailto:joergprante@gmail.com> wrote:

Document deletes just mark documents as deleted until next segment
merge. To enforce visibility of deleted documents to all index
readers, you must optimize the index (to trigger a segment merge).
Note, using refresh/optimize is very harmful to performance.

Jörg

Am 03.04.13 08:28, schrieb muzammil.abdul@enhancesys.com
<mailto:muzammil.abdul@enhancesys.com>:

    Any how I had set setRefresh(true) to my bulkRequestBuilder
    after setting this I was able to search for the documents that
    I had indexed using the bulk but the the documents which I had
    deleted using the bulk remains unchanged


-- 
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/n5rJuEtVQtA/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email
to elasticsearch+unsubscribe@googlegroups.com
<mailto:elasticsearch%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.