# NEST indexing missing documents without errors

**URL:** <https://discuss.elastic.co/t/nest-indexing-missing-documents-without-errors/284370>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [September 16, 2021, 8:07am UTC](https://discuss.elastic.co/t/nest-indexing-missing-documents-without-errors/284370 "2021-09-16T08:07:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vyil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vyil/32/77079_2.png) [@Vyil](https://discuss.elastic.co/u/Vyil)\
**Post date:** [September 16, 2021, 8:07am UTC](https://discuss.elastic.co/t/nest-indexing-missing-documents-without-errors/284370/1 "2021-09-16T08:07:37Z")

</div>

Hi there,

So i'm trying to index around 636k documents into my ES node. I have a 1 node cluster where i end up with around 550k/636k documents, and i don't get any error messages at all while indexing.

Then i try on my local machine with 3 node setup and it misses documents aswell.

I'm using the NEST client, i make multiple SQL calls, combine the data into a document, gather 100 documents and bulk push them.

```auto
foreach (int a in ids)
                {
                    counter++;
                    Console.WriteLine("Running #: " + counter);
                    Declaration declaration = CreateDeclaration();
                    string id = a + ";";
                    declaration = _elasticRepository.GetDecQuery(Constants.DEC_SQL + id, declaration);
                    declaration = _elasticRepository.GetXMLQuery(Constants.XML_SQL + id, declaration);
                    declaration = _elasticRepository.GetSpecialsQuery(Constants.SPECIAL_SQL + id, declaration);
                    declaration = _elasticRepository.GetPrQuery(Constants.PR_SQL + id, declaration);
                    declaration = _elasticRepository.GetGoodsQuery(Constants.GOODS_SQL + id, declaration);
                    declaration = _elasticRepository.GetDocsQuery(Constants.DOCS_SQL + id, declaration);
                    declaration = _elasticRepository.GetCtrQuery(Constants.CTR_SQL + id, declaration);

                    decList.Add(declaration);
                    if (decList.Count > 99 || counter == ids.Count)
                    {
                        LoadToElastic(client, decList);
                        decList.Clear();
                        if(counter == ids.Count) { Log.Information("Done loading: " + DateTime.Now.ToString()); }
                    }

```

```auto
//LoadToElastic function
 var indexManyResponse = client.IndexMany(declaration);
            if (indexManyResponse.Errors)
            {
                 Log.Error("Logged errors in indexMany between dec_ids: " + declaration[0] + " - " + declaration[99]);
                 Console.WriteLine("Error occured in indexMany: ");
                    
            }
            if (!indexManyResponse.IsValid)
            {
                Log.Error("Logged an invalid response between dec_ids: " + declaration[0] + " - " + declaration[99]);
                Console.WriteLine("Error occured in indexmany");
            }

```

This is a general overview of the implementation, in neither responses i get an error. Any ideas where to look at?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 20, 2021, 4:58am UTC](https://discuss.elastic.co/t/nest-indexing-missing-documents-without-errors/284370/2 "2021-09-20T04:58:46Z")

</div>

I don't know nest, so hopefully one of the clients team will drop in. A few clarifying questions though;

- Are you using the bulk helper?
- Are you checking and logging the responses back from Elasticsearch?

---

<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:** [October 18, 2021, 4:58am UTC](https://discuss.elastic.co/t/nest-indexing-missing-documents-without-errors/284370/3 "2021-10-18T04:58:50Z")

</div>

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