How to Store and retrieve 3,000,000+ words in Dynamically without using SQL..
Get a word form a document then check whether the word is available or not.
if available, then increment it in corresponding document count...
if not available i.e, New word then create a new column then increment the document count and put Zero to all other documents.
For Example..
I having 93,000 documents each contains more or less 5000 words. If new word comes then add a new column. Likewise 960000 words came.
----------------Word1 word2 word3 word4 word5 ….---- New Word … word96000
Document1 ----2 ----19 ----45 ----16 ----7 ---- ------….0 ----.. ----..
Document2 ----4 ----6 ----3 ----56 ----3 ----…. --------0 ----.. ----..
Document3 ----56 ----34 ----1 ----67 ----4 ----…. --------0 ----.. ----..
Document4 ----7 ----45 ----9 ----45 ----6 ----…. --------0 ----.. ----..
Document5 ----56 ----43 ----234 ----87 ----46 ----…. --------0 ----..
Document6 ----56 ----6 ----2 ----5 ----23 ----…. --------0 ----.. ----..
. …. . .. ..
. …. . .. ..
. …. . .. ..
. …. . .. ..
. …. . .. ..
. …. . .. ..
. …. . .. ..
Document1000 ----5 ----9 ----9 ----89 ----34 ----…. --------1 .. ..
Count of those words that are added are dynamically updated in the corresponding document's entry.