# Use a NEST based Client with Indices created from fscrawler

**URL:** <https://discuss.elastic.co/t/use-a-nest-based-client-with-indices-created-from-fscrawler/343782>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [September 25, 2023, 2:37pm UTC](https://discuss.elastic.co/t/use-a-nest-based-client-with-indices-created-from-fscrawler/343782 "2023-09-25T14:37:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voidi/32/125988_2.png) [@Voidi](https://discuss.elastic.co/u/Voidi)\
**Post date:** [September 25, 2023, 2:37pm UTC](https://discuss.elastic.co/t/use-a-nest-based-client-with-indices-created-from-fscrawler/343782/1 "2023-09-25T14:37:42Z")

</div>

I want create Client program based on the NEST Library which queries an Index created with [GitHub - dadoonet/fscrawler: Elasticsearch File System Crawler (FS Crawler)](https://github.com/dadoonet/fscrawler) .  
Most NEST tutorials show that i should create a class for the documents returned by a search request. But in the [Tutorial — FSCrawler 2.10-SNAPSHOT documentation](https://fscrawler.readthedocs.io/en/latest/user/tutorial.html) i cannot find information on how to do that.

As i totally new to Elasticsearch i may have overlooked something. Can anybody point me in the right direction?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 25, 2023, 3:32pm UTC](https://discuss.elastic.co/t/use-a-nest-based-client-with-indices-created-from-fscrawler/343782/2 "2023-09-25T15:32:11Z")

</div>

Welcome!

I don't know Nest to b honest but I guess you need to create a Nest object which represents the data structure built by FSCrawler...

I guess you can do it from the mapping:

> <https://github.com/dadoonet/fscrawler/blob/master/settings/src/main/resources/fr/pilato/elasticsearch/crawler/fs/_default/8/_settings.json>

Or from the Java version of the objects:

> <https://github.com/dadoonet/fscrawler/blob/master/beans/src/main/java/fr/pilato/elasticsearch/crawler/fs/beans/Doc.java>

---

<div class="post-metadata">

**Author:** ![Voidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voidi/32/125988_2.png) [@Voidi](https://discuss.elastic.co/u/Voidi)\
**Post date:** [September 26, 2023, 10:03am UTC](https://discuss.elastic.co/t/use-a-nest-based-client-with-indices-created-from-fscrawler/343782/3 "2023-09-26T10:03:35Z")

</div>

Thanks, this is a start.  
As the response from Elasticsearch has property names that are reserved words in C# like `object` and `virtual` how do i specify a custom serialization mapping?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 26, 2023, 10:28am UTC](https://discuss.elastic.co/t/use-a-nest-based-client-with-indices-created-from-fscrawler/343782/4 "2023-09-26T10:28:55Z")

</div>

Ha! I guess that's a Nest question I can not answer. Sorry.

May be someone who is a Nest dev could help?

---

<div class="post-metadata">

**Author:** ![Voidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voidi/32/125988_2.png) [@Voidi](https://discuss.elastic.co/u/Voidi)\
**Post date:** [September 26, 2023, 12:20pm UTC](https://discuss.elastic.co/t/use-a-nest-based-client-with-indices-created-from-fscrawler/343782/5 "2023-09-26T12:20:17Z")

</div>

I guess i found the solution for this [https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/modelling-documents-with-types.html#propertyname-attribute](https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/modelling-documents-with-types.html#propertyname-attribute)

---

<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 24, 2023, 12:20pm UTC](https://discuss.elastic.co/t/use-a-nest-based-client-with-indices-created-from-fscrawler/343782/6 "2023-10-24T12:20:56Z")

</div>

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