2

I'm new to elastic search and I have a basic question. I want to load data from database and search them by using elastic search in MVC.NET project, but cause of data I have in my database's table I cant't convert all of them to the json and search in thme by using elastic search. How should I fill data of the elastic search from the database in an mvc.net project. I don't want the whole solution because it is impossible just a general and brief explanation. thank you very much.

1 Answer 1

1

First of all you should be able to model your data from SQL to ElasticSearch. As ElasticSearch is a NoSQL and document oriented database/search engine. You need an indexer to index SQL data to ElasticSearch. Get all the columns associated with one record that you want to search in ElasticSearch from your SQL database (use joins if data is in multiple tables). Use a dedicated Stored Procedure to get only needed data and construct a document class, serialize to JSON and index in your ElasticSearch cluster.

Use ElasticSearch.net client as they very neatly expose bulk index APIs.

Hope this will get you started. Have fun

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.