# Reindex failing with SearchContextMissingException: No search context found for id (batch size = 1)

**URL:** <https://discuss.elastic.co/t/reindex-failing-with-searchcontextmissingexception-no-search-context-found-for-id-batch-size-1/229191>\
**Category:** Elasticsearch\
**Created:** [April 22, 2020, 6:49am UTC](https://discuss.elastic.co/t/reindex-failing-with-searchcontextmissingexception-no-search-context-found-for-id-batch-size-1/229191 "2020-04-22T06:49:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrpew](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mrpew](https://discuss.elastic.co/u/mrpew)\
**Post date:** [April 22, 2020, 6:49am UTC](https://discuss.elastic.co/t/reindex-failing-with-searchcontextmissingexception-no-search-context-found-for-id-batch-size-1/229191/1 "2020-04-22T06:49:35Z")

</div>

Hello 🙂

I am trying to reindex about 3mil documents (~50gb) trough an ingestion pipeline.

```auto
POST _reindex?&wait_for_completion=false
{
  "source": {
    "size": 1, 
    "index": "src"
  },
  "dest": {
    "index": "dst"
    "pipeline": "reindex_pipeline"
  }
}

```

As you can see, I already tried lower batch sizes (even down to one)  
but as the pipeline is doing some heavy computations, it seems at least one document is causing a scroll context to become invalid.

Is there any other way (besides lowering batch size) to fight this?

```auto
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
...
Caused by: org.elasticsearch.transport.RemoteTransportException: [node name][127.0.0.1:9300][indices:data/read/search[phase/query+fetch/scroll]]
...
Caused by: org.elasticsearch.search.SearchContextMissingException: No search context found for id [...]

```

(Single Node running ES6.7)

---

<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:** [May 20, 2020, 6:49am UTC](https://discuss.elastic.co/t/reindex-failing-with-searchcontextmissingexception-no-search-context-found-for-id-batch-size-1/229191/2 "2020-05-20T06:49:37Z")

</div>

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