/// <summary> /// Creates a new batch message that only contains modified documents because the create, delete, or update /// of an address implies another entity had a modified, created, or deleted address related to it. Therefore, /// the organization, person, etc must be re-indexed. /// </summary> /// <returns>The batch message detailing the person or organization indexed document must be updated.</returns> public override IndexDocumentBatchMessage GetBatchMessage() { var baseMessage = new IndexDocumentBatchMessage(); baseMessage.ModifiedDocuments = this.RelatedEntityDocumentKeys.Select(x => x.ToString()).ToList(); return(baseMessage); }
/// <summary> /// Returns the message to send to the azure queue. /// </summary> /// <returns>The azure queue message.</returns> public virtual IndexDocumentBatchMessage GetBatchMessage() { var batch = new IndexDocumentBatchMessage(); batch.CreatedDocuments = this.CreatedEntities.Select(x => GetDocumentKey(x, GetEntityEntry(x)).ToString()).ToList(); batch.DeletedDocuments = this.DeletedEntities.Select(x => GetDocumentKey(x, GetEntityEntry(x)).ToString()).ToList(); batch.ModifiedDocuments = this.ModifiedEntities.Select(x => GetDocumentKey(x, GetEntityEntry(x)).ToString()).ToList(); return(batch); }
private CloudQueueMessage GetCloudQueueMessage(IndexDocumentBatchMessage message) { return(new CloudQueueMessage(JsonConvert.SerializeObject(message))); }