Example #1
0
 private ExDateTime GetQueryWindowStartTime(PeopleModelItem modelItem)
 {
     if (!modelItem.IsDefaultModel)
     {
         return(this.LastProcessedTime(modelItem));
     }
     return(ExDateTime.UtcNow - SentItemsTrainingSubDocumentGenerator.DefaultTimeSpanBacklogToProcess);
 }
Example #2
0
        internal IDocument RunTrainingQuery(MailboxSession session, PeopleModelItem modelItem)
        {
            int num = this.IsDefaultModel(modelItem) ? this.ItemsToFetchForDefaultModel : this.ItemsToFetchForTrainedModel;

            this.InitializeForQuery(num);
            ExDateTime queryWindowStartTime = this.GetQueryWindowStartTime(modelItem);
            ExDateTime queryWindowEndTime   = this.GetQueryWindowEndTime(modelItem);
            IDocument  document             = MdbInferenceFactory.Current.CreateTrainingSubDocument(this.GetItems(session, queryWindowStartTime, queryWindowEndTime, modelItem), num, session.MailboxGuid, session.MdbGuid);

            this.DiagnosticsSession.TraceDebug <int>("CrawlerItemIterator returned the following number of items for training {0}", document.NestedDocuments.Count);
            return(document);
        }
Example #3
0
 private ExDateTime LastProcessedTime(PeopleModelItem modelItem)
 {
     return(new ExDateTime(ExTimeZone.UtcTimeZone, modelItem.LastProcessedMessageSentTime.ToUniversalTime()));
 }
Example #4
0
 private bool IsDefaultModel(PeopleModelItem modelItem)
 {
     return(modelItem.IsDefaultModel);
 }
Example #5
0
 private ExDateTime GetQueryWindowEndTime(PeopleModelItem modelItem)
 {
     return(ExDateTime.UtcNow.AddDays((double)(-(double)this.NumberOfDaysToSkip)).ToUtc());
 }
Example #6
0
 private IEnumerable <MdbCompositeItemIdentity> GetItems(MailboxSession session, ExDateTime startTime, ExDateTime endTime, PeopleModelItem modelItem)
 {
     return(this.ItemIterator.GetItems(session, startTime, endTime));
 }