I have to design a system with this schema.
{
"documentId" : 123
"documentType" : "paper"
"tags" :["abc","xyz"]
//other meta data of document
}
The queries I will be doing will be finding k popular tags, get documents by tag,add,remove,update tags and get all tags of a document. What is the optimal strategy to do this considering DB should be highly scalable. I am thinking of three solutions -
What is the optimal way to handle such cases?
It depends;
IMHO, If answer to Q1 is Yes and update rate is low , use ES
If answer to Q1 is No, and the Update rate is high, you may want to consider a non-Elasticsearch solution.
If the update rate is high and Q1 is Yes, consider a non-Elasticsearch solution ( Depends on size of your index, it is very much possible to use ES , not that it may be optimal)