Use a NEST based Client with Indices created from fscrawler

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) .
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 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?

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:

Or from the Java version of the objects:

1 Like

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?

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

May be someone who is a Nest dev could help?

1 Like

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

1 Like

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