Waddah Rasheed
Waddah Rasheed

Reputation: 279

How to implement ElasticSearch with asp.net web application?

I have read the documentation of ElasticSearch and I am familiar with its endpoints and how to maintain Clusters,Nodes,Indices,etc.

Now I am planning to use it in an Asp.net web api and I am a little bit confused about what is the best way to implement it.

I found that ElasticSearch provides two options to work with .Net application:

1)Nest

2)ElasticSearch.net

So, my first question which way is preferred to integrate my web application with ElasticSearch so I can get advantage of the power of Elasticsearch in searching/analyzing/managing big amount of data and what are the advantages and disadvantages of each one ?

My second question I have read that Nest is a high level client and Elasticsearch.net is a low level one.What does that mean?

My third question do the above libraries expose all ElasticSearch endpoints or are there limitations?

My fourth question is there another way to integrate ElasticSearch in my web application other than the above two libraries?

I would appreciate any references,tutorials so I can get started with(because the documentation of ElasticSearch website is not clear).

Upvotes: 3

Views: 3460

Answers (1)

Russ Cam
Russ Cam

Reputation: 125488

Check out the documentation for the .NET clients as I think it answers all your questions.

Both NEST and Elasticsearch.Net expose all of the APIs within Elasticsearch, with the former mapping each request and response to a type so you don't need to do this yourself.

You can of course write your own implementation to interact with Elasticsearch over HTTP. Use whichever you're most comfortable with, but personally I'd recommend starting with NEST as it handles a lot of things for you such as mapping inference, connection behaviour with round-robin, etc. (disclaimer: I work on the Elasticsearch .NET clients).

For an example tutorial of integrating with a .NET (Nancy) web application, check out NuSearch.

Upvotes: 3

Related Questions