if (bStoreContent && bDocHasExternalContent) {
try
{
String rawText = this.bStoreRawContent ? doc.getRawFullText() : null;
DocumentPojo meta = bStoreMetadataAsContent ? doc : null;
CompressedFullTextPojo gzippedContent = new CompressedFullTextPojo(doc.getUrl(), doc.getSourceKey(), doc.getCommunityId(),
doc.getFullText(), rawText, meta, nMaxContentLen_bytes);
if (null != gzippedContent.getUrl()) {
// Be efficient and write field-by-field vs using JSON conversion
BasicDBObject query = new BasicDBObject(CompressedFullTextPojo.url_, gzippedContent.getUrl());
query.put(CompressedFullTextPojo.sourceKey_, gzippedContent.getSourceKey());
BasicDBObject update = gzippedContent.getUpdate();
if (!_diagnosticMode) {
contentDb.update(query, update, true, false); // (ie upsert, supported because query includes shard key==url)
}
else {
System.out.println("StoreAndIndexManager.savedContent, save content: " + gzippedContent.getUrl());
}
}
}
catch (Exception ex)
{