# Need to force search results only after indexing is complete

**URL:** <https://discuss.elastic.co/t/need-to-force-search-results-only-after-indexing-is-complete/170411>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [February 28, 2019, 9:46pm UTC](https://discuss.elastic.co/t/need-to-force-search-results-only-after-indexing-is-complete/170411 "2019-02-28T21:46:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diadems](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@Diadems](https://discuss.elastic.co/u/Diadems)\
**Post date:** [February 28, 2019, 9:46pm UTC](https://discuss.elastic.co/t/need-to-force-search-results-only-after-indexing-is-complete/170411/1 "2019-02-28T21:46:57Z")

</div>

2 ES nodes cluster (non-prod lab)  
ES version 6.1  
RAM =24 GB/ node  
CPU cores =6/ node

1. 

I am working on a use case where I need to do bulk indexing of large number of records (around 2 million - close to 900 MB total) and results to show up in search only after the entire indexing is done.

I disabled the refresh\_interval, assuming i would need to refresh manually after indexing is complete for the full data bulk upload.  
But during indexing process, i noticed the search results started showing up while only half the records had been indexed (~ 450 MB).  
I also noticed cluster's memory release and segment count increased at around this time.

Researching more about this behavior, is it the ES’s default flush process which could have caused this?  
I wanted to know more about the optimal metrics for the ES clusters for below config parameters and also its implications on the performance of the cluster to find - the max threshold for this cluster that i can set and use.

1. 

I also read that disk I/O and file system cache may be dependent parameters to consider.  
Can I know how would these affect the bulk index and search results for my use case

Any help on this would be really appreciated.  
Thanks!  
D

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 28, 2019, 9:50pm UTC](https://discuss.elastic.co/t/need-to-force-search-results-only-after-indexing-is-complete/170411/2 "2019-02-28T21:50:30Z")

</div>

Maybe you could search through an alias that you only link to the index once indexing has finished?

---

<div class="post-metadata">

**Author:** ![Diadems](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@Diadems](https://discuss.elastic.co/u/Diadems)\
**Post date:** [February 28, 2019, 10:14pm UTC](https://discuss.elastic.co/t/need-to-force-search-results-only-after-indexing-is-complete/170411/3 "2019-02-28T22:14:50Z")

</div>

It has to be dynamically accessed by the application.  
I can do this manually in lab but how to go about doing it in production cluster

---

<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:** [March 28, 2019, 10:14pm UTC](https://discuss.elastic.co/t/need-to-force-search-results-only-after-indexing-is-complete/170411/4 "2019-03-28T22:14:51Z")

</div>

Closed on March 28, 2019, 10:14pm UTC

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