Oct 8th, 2012, 10:57 AM
Mongo/BSON and compression question
I have a large document (20-30KB) where one field contains nested data making up about 80% of the data in a document. I'd like to use GZIP compression on this one field, and do it somehow with Spring MongoDB mapping.
So basically, I'd like to convert this complex field to a String, manually marshal with BSON and GZIP it, and then set the value on the document. It's a nested field that is a GZIPed chunk of BSON.
This would reduce the size of my database, preventing me from considering sharding.
Just looking at the MappingMongoConverter code a bit- maybe that can be used manually?
Last edited by moores; Oct 8th, 2012 at 11:10 AM.