Package com.ikanow.infinit.e.data_model.store.document

Examples of com.ikanow.infinit.e.data_model.store.document.CompressedFullTextPojo


        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)
          {
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.data_model.store.document.CompressedFullTextPojo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.