I am reading about the Elasticsearch, but one question that is always coming to my head: if I have an already existing Relational Database, how can I start using the Elasticsearch with it. From my understanding every thing must be stored in a non relational way (That's what I see from videos and the official documentation).
Add a comment
|
1 Answer
You dont need to convert your existing data into non relational way.. there are few elasticsearch-jdbc tools, called rivers that will do the task. You just configure them and they are designed to handle the indexes that must be stored on elasticsearch server.
You can read more about it here.
4 Comments
delpha
so, how will the types and data in general be correctly constructed, since tables related with foreign keys are different in a non relational DB?
karthik manchala
yeah.. there is no concept of joins in non relational databases.. elasticsearch handles relational joins by creating nested JSON objects.
delpha
so, if I have a web application that is connected to relational database, and I want to use the elastic search, does that mean that I should have two types of databases? a relational one for the web application, and a non-relational for the search?
karthik manchala
No no.. that is not what i meant! When you use elasticsearch for searching.. that means you are creating indexes on elasticsearch server. These indexes are stored as documents containing json objects.. And in a way you are using two datastores.. one relational-where all your data resides, and one indexing store- where only indexed data is stored. Hope this answers your question.