public virtual int IdentifyGroup(string language, string db, string groupId)
        {
            List <string> groupIdSet = new List <string> {
                groupId
            };
            var list = SearchService.GetFaceIdResults(language, db);

            long line = 0;

            DataWrapper.SetJobPriority(ThreadPriority.Highest);
            DataWrapper.SetJobTotal(list.Count);

            foreach (var item in list)
            {
                line++;
                DataWrapper.SetJobStatus(line);

                DetectAndIdentifyPeople(item, db, groupIdSet);
                SearchService.UpdateItemInIndex(item, db);
            }

            DataWrapper.SetJobState(JobState.Finished);

            return(list.Count);
        }
        public virtual int AnalyzeImagesRecursively(List <ImageSearchResult> itemList, string db, bool overwrite)
        {
            long line = 0;

            DataWrapper.SetJobPriority(ThreadPriority.Highest);
            DataWrapper.SetJobTotal(itemList.Count);

            foreach (ImageSearchResult i in itemList)
            {
                line++;
                var analysis = ImageAnalysisFactory.Create(i);
                if (overwrite || analysis == null || analysis.HasNoAnalysis())
                {
                    AnalyzeImage(i.GetItem(), i.FacialAnalysis, i.TextAnalysis, i.VisionAnalysis);
                }

                DataWrapper.SetJobStatus(line);
            }

            DataWrapper.SetJobState(JobState.Finished);

            return(itemList.Count);
        }