I have a MongoDB collection named market_data. It has documents which looks like this:
{
"_id" : ObjectId("1235"),
"nm" : " eod_ny",
"asOfDt" : "2018-11-20",
"rgnId" : 1,
"mrktCntxtDfId" : ObjectId("32345")
"rlsd" : false,
"crtdOn" : ISODate("2018-11-21T02:05:12.331Z"),
“observations” : [
{
Key1: “abc”,
Key2: : “def”
},
{
Key1: “123”,
Key2: : “456”
}
]
}
For most of the documents, the length of observation array is quite less, but for few records (around 20-30) daily the observation array has more than million records and it exceeds the 16 MB limit.
Is there any strategy I can apply to store this data without moving to GridFS.
I'm using MongoDB raw Java driver latest version in my application.