# Issue Storing Large Documents in Elasticsearch

**URL:** <https://discuss.elastic.co/t/issue-storing-large-documents-in-elasticsearch/378911>\
**Category:** Kibana\
**Created:** [June 5, 2025, 11:54am UTC](https://discuss.elastic.co/t/issue-storing-large-documents-in-elasticsearch/378911 "2025-06-05T11:54:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![harsh\_bharkhda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harsh_bharkhda/32/143534_2.png) [@harsh\_bharkhda](https://discuss.elastic.co/u/harsh_bharkhda)\
**Post date:** [June 5, 2025, 11:54am UTC](https://discuss.elastic.co/t/issue-storing-large-documents-in-elasticsearch/378911/1 "2025-06-05T11:54:45Z")

</div>

I'm facing an issue while trying to index large data objects in Elasticsearch. When the object size increases (possibly due to a large metadata field), the document fails to get indexed, but no clear error is returned in some cases.

- **Elasticsearch Version:** (8.15.2)
- **Client used:** (.NET)
- **Index mapping:** predefined
- **Approximate document size:** (e.g., \>100 kb JSON payload)

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 5, 2025, 12:19pm UTC](https://discuss.elastic.co/t/issue-storing-large-documents-in-elasticsearch/378911/2 "2025-06-05T12:19:57Z")

</div>

> [@harsh\_bharkhda](#):
>
> When the object size increases (possibly due to a large metadata field), the document fails to get indexed, but no clear error is returned in some cases.

You should have an error with the reason why the message was rejected, are you capturing the response error in your client?

What your mapping looks like? Please share it.

---

<div class="post-metadata">

**Author:** ![harsh\_bharkhda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harsh_bharkhda/32/143534_2.png) [@harsh\_bharkhda](https://discuss.elastic.co/u/harsh_bharkhda)\
**Post date:** [June 5, 2025, 12:34pm UTC](https://discuss.elastic.co/t/issue-storing-large-documents-in-elasticsearch/378911/3 "2025-06-05T12:34:25Z")

</div>

No i'm not getting any error but whenever i store any small object its stored but not large object

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 5, 2025, 12:40pm UTC](https://discuss.elastic.co/t/issue-storing-large-documents-in-elasticsearch/378911/4 "2025-06-05T12:40:37Z")

</div>

> [@harsh\_bharkhda](#):
>
> No i'm not getting any error but whenever i store any small object its stored but not large object

If Elasticsearch rejects a document it returns an error, you need to capture the Elasticsearch response to see the reason.

I'm not familiar with the .NET client, so not sure how you do that with this client.
