def save_many(self, docs, timestamp, comment, data, ip, author, action=None): action = action or "bulk_update" s = SaveImpl(self.db, self.schema, self.indexer, self.property_manager) # Hack to allow processing of json before using. Required for OL legacy. s.process_json = process_json docs = common.format_data(docs) changeset = s.save(docs, timestamp=timestamp, comment=comment, ip=ip, author=author, action=action, data=data) # update cache. # Use the docs from result as they contain the updated revision and last_modified fields. for doc in changeset.get('docs', []): web.ctx.new_objects[doc['key']] = simplejson.dumps(doc) return changeset
def reindex(self, keys): s = SaveImpl(self.db, self.schema, self.indexer, self.property_manager) # Hack to allow processing of json before using. Required for OL legacy. s.process_json = process_json return s.reindex(keys)