# How to replace NEST class Attachment?

**URL:** <https://discuss.elastic.co/t/how-to-replace-nest-class-attachment/360074>\
**Category:** Elasticsearch\
**Created:** [May 23, 2024, 12:36pm UTC](https://discuss.elastic.co/t/how-to-replace-nest-class-attachment/360074 "2024-05-23T12:36:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankmehlhop.com](https://avatars.discourse-cdn.com/v4/letter/f/97f17d/32.png) [@frankmehlhop.com](https://discuss.elastic.co/u/frankmehlhop.com)\
**Post date:** [May 23, 2024, 12:36pm UTC](https://discuss.elastic.co/t/how-to-replace-nest-class-attachment/360074/1 "2024-05-23T12:36:47Z")

</div>

I used to use the NEST library. This is now deprecated. I have implemented the recommended Elastic.Client.Elasticsearch. However, this library does not recognise the Attachment or ElasticClient class.  
How do I deal with this problem? I cannot find an entry in the Elasticsearch documentation on how to add and search (pdf) documents.

---

<div class="post-metadata">

**Author:** ![Sander\_Philipse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sander_philipse/32/101890_2.png) [@Sander\_Philipse](https://discuss.elastic.co/u/Sander_Philipse)\
**Post date:** [May 24, 2024, 12:47pm UTC](https://discuss.elastic.co/t/how-to-replace-nest-class-attachment/360074/2 "2024-05-24T12:47:52Z")

</div>

Generally speaking, the best way to ingest PDFs into Elasticsearch is to extract their content first. You can do this using a library such as Tika, or by using the attachment processor in an ingest pipeline: [Attachment processor | Elasticsearch Guide [8.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/attachment.html)

---

<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:** [June 21, 2024, 12:48pm UTC](https://discuss.elastic.co/t/how-to-replace-nest-class-attachment/360074/3 "2024-06-21T12:48:40Z")

</div>

Closed on June 21, 2024, 12:48pm UTC

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