/// <summary>
        /// Check the Near Dupe result document and find Master document in Family group
        /// In same cluster Group, first document treated as Master (Base) document,
        /// remaining documents in same cluster group are treated as non-Master (Base) document
        /// </summary>
        private static bool IsMasterDocumentInNearDuplicationGroup(NearDuplicateResultInfo document, bool isMasterDocument,
                                                                   ref string nearDupeFamilyId)
        {
            var documentNearDupeFamilyId = document.ClusterSort.ToString(CultureInfo.InvariantCulture) + "_" +
                                           document.FamilySort.ToString(CultureInfo.InvariantCulture);

            if (nearDupeFamilyId == string.Empty || nearDupeFamilyId != documentNearDupeFamilyId)
            {
                nearDupeFamilyId = documentNearDupeFamilyId;
            }
            else if (nearDupeFamilyId == documentNearDupeFamilyId)
            {
                /*In same cluster Group, first document treated as Master (Base) document,
                 *  remaining documents in same cluster group are treated as non-Master (Base) document */
                isMasterDocument = false;
            }
            return(isMasterDocument);
        }
 /// <summary>
 /// Check the Near Dupe result document and find Master document in Family group
 /// In same cluster Group, first document treated as Master (Base) document, 
 /// remaining documents in same cluster group are treated as non-Master (Base) document 
 /// </summary>
 private static bool IsMasterDocumentInNearDuplicationGroup(NearDuplicateResultInfo document, bool isMasterDocument,
                                              ref string nearDupeFamilyId)
 {
     var documentNearDupeFamilyId = document.ClusterSort.ToString(CultureInfo.InvariantCulture) + "_" +
                                    document.FamilySort.ToString(CultureInfo.InvariantCulture);
     if (nearDupeFamilyId == string.Empty || nearDupeFamilyId != documentNearDupeFamilyId)
     {
         nearDupeFamilyId = documentNearDupeFamilyId;
     }
     else if (nearDupeFamilyId == documentNearDupeFamilyId)
     {
         /*In same cluster Group, first document treated as Master (Base) document, 
             remaining documents in same cluster group are treated as non-Master (Base) document */
         isMasterDocument = false;
     }
     return isMasterDocument;
 }