# Elastic search CRUD function only working in debug mode

**URL:** <https://discuss.elastic.co/t/elastic-search-crud-function-only-working-in-debug-mode/23654>\
**Category:** Elasticsearch\
**Created:** [May 20, 2015, 3:38pm UTC](https://discuss.elastic.co/t/elastic-search-crud-function-only-working-in-debug-mode/23654 "2015-05-20T15:38:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam1](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sam1](https://discuss.elastic.co/u/sam1)\
**Post date:** [May 20, 2015, 3:38pm UTC](https://discuss.elastic.co/t/elastic-search-crud-function-only-working-in-debug-mode/23654/1 "2015-05-20T15:38:11Z")

</div>

2 issues are there:

1.Elastic search CRUD function only working in debug mode, not in normal  
mode.(while running in eclipse debug mode)

Or else if we put Thread .sleep(5000),then also it is working(without debug  
mode) but impact the performance. .

2.Allowing only to add upto 10 records.If try to add more than that ,it is  
overriding the existing records.

other details used in application:

-Elasticsearch client is spring autowired (@autowired Client)  
-Using elasticsearch node in spring config file as -

elasticsearch:node-client id="client" local="true"\>

sample query used for create and get:  
client.prepareIndex(index, type, id).setSource(json).execute().actionGet();  
Thread .sleep(5000)

GetResponse getResponse = client.prepareGet().execute().actionGet();

Pls let me know for any more details required.  
Appreciate a lot,if get quick response .Many thanks in advance.

## -- Please update your bookmarks! We have moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7847850e-edac-4d99-9fb6-eb103e9149ba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7847850e-edac-4d99-9fb6-eb103e9149ba%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:13am UTC](https://discuss.elastic.co/t/elastic-search-crud-function-only-working-in-debug-mode/23654/2 "2017-07-06T00:13:01Z")

</div>

Closed on July 6, 2017, 12:13am UTC


