Home > Blockchain >  ElasticSearch as primary DB for document library
ElasticSearch as primary DB for document library

Time:06-24

My task is a full-text search system for a really large amount of documents. Now I have documents as RTF file and their metadata, so all this will be indexed in elastic search. These documents are unchangeable (they can be only deleted) and I don't really expect many new documents per day. So is it a good idea to use elastic as primary DB in this case?

Maybe I'll store the RTF file separately, but I really don't see the point of storing all this data somewhere else.

CodePudding user response:

This question was solved here. So it's a good case for elasticsearch as the primary DB

CodePudding user response:

Elastic is more known as distributed full text search engine , not as database...

If you preserve the document _source it can be used as database since almost any time you decide to apply document changes or mapping changes you need to re-index the documents in the index(known as table in relation world) , there is no possibility to update parts of the elastic lucene inverse index , you need to re-index the whole document ... Elastic index survival mechanism is one of the best , meaning that if you loose node the index lost replicas are automatically replicated to some of the other available nodes so you dont need to do any manual operations ... If you do regular backups and having no requirement the data to be 24/7 available it is completely acceptable to hold the data and full text index in elasticsearch as like in database ...

But if you need highly available combination I would recommend keeping the documents in mongoDB (known as best for distributed document store) for example and use elasticsearch only in its original purpose as full text search engine ...

  • Related