private void ProduceFamiliesRecords(IEnumerable <ParentRecord> parentRecords)
 {
     Parallel.Invoke(
         () => IndexHelper.UpsertFamiliesInSearchEngine(parentRecords, MatterId, CollectionId),
         () => vaultHelper.Insert(parentRecords.Where(p => p.Disposition == DispositionEnum.Insert)),
         () => vaultHelper.Update(parentRecords.Where(p => p.Disposition == DispositionEnum.Update))
         );
     IncreaseProcessedDocumentsCount(parentRecords.Count());
 }
예제 #2
0
        private void ProduceThreadsRecords()
        {
            // Debug
            //Tracer.Debug(resultsAccumulator.ToString());

            Parallel.Invoke(
                () => vaultHelper.Delete(resultsAccumulator.ListToDelete, "DOC_DocumentThreads"),
                () => IndexHelper.DeleteFromSearchEngine(resultsAccumulator.ListToDelete, MatterId, CollectionId),
                () => vaultHelper.Insert(resultsAccumulator.ListToInsert),
                () => vaultHelper.Update(resultsAccumulator.ListToUpdate),
                () => IndexHelper.UpsertThreadsInSearchEngine(resultsAccumulator.ListToInsert.SafeConcat(resultsAccumulator.ListToUpdate), MatterId, CollectionId)
                );
            IncreaseProcessedDocumentsCount(
                resultsAccumulator.InsertCount +
                resultsAccumulator.UpdateCount +
                resultsAccumulator.DeleteCount
                );
        }