Use the right tool for the job.
There are many anti-RDBMS or BASE systems (mostly affordable, mild, ultimately compatible), unlike ACIDs (Atomicity, Consistency, Isolation, Durability) to choose from here and here .
I used traditional RDBMS, and although you can store CLOB / BLOB, they do not have built-in indexes specifically designed to search for these objects.
You want to do most of the work (calculating the weighted frequency for each tuple found) when inserting a document.
You may also want to do some work by calculating the utility of each (documentId, searchWord) pair after each search.
This way you can search better and better each time.
You also want to save a rating or weight for each search and weighted ratings for similarities with other searches.
It is likely that some searches are more common than others, and that users do not correctly formulate their search query, although they mean for a general search.
The insertion of the document should also lead to some change in the weight of the index search.
The more I think about it, the more difficult the decision. You must start with a good design first. The more factors the design expects, the better the result.
source share