# Wait until indexed in NEST

**URL:** <https://discuss.elastic.co/t/wait-until-indexed-in-nest/98071>\
**Category:** Elasticsearch\
**Created:** [August 23, 2017, 12:23pm UTC](https://discuss.elastic.co/t/wait-until-indexed-in-nest/98071 "2017-08-23T12:23:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjgasior](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@mjgasior](https://discuss.elastic.co/u/mjgasior)\
**Post date:** [August 23, 2017, 12:23pm UTC](https://discuss.elastic.co/t/wait-until-indexed-in-nest/98071/1 "2017-08-23T12:23:49Z")

</div>

As in the topic - how can I wait until everything is indexed and searchable without using the Refresh method?

```
var projects = new List<Project>()
{
	(...)
};

IBulkResponse response = await Client.IndexManyAsync(projects);
if (response.IsValid)
{
	Client.Refresh(INDEX_NAME);
	ISearchResponse<Project> searchResponse = await Client.SearchAsync<Project>(s => 
			s.Size(1000).MatchAll());
	return searchResponse.Documents;
}

```

Is there any option of using [?refresh=wait\_for](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-refresh.html) as said [here](https://stackoverflow.com/a/38864048/1923409)?

---

<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:** [September 20, 2017, 12:23pm UTC](https://discuss.elastic.co/t/wait-until-indexed-in-nest/98071/2 "2017-09-20T12:23:53Z")

</div>

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