text: public static IndexDeletionPolicy GetIndexDeletionPolicy(Config config){string deletionPolicyName = config.Get("deletion.policy", "Lucene.Net.Index.KeepOnlyLastCommitDeletionPolicy, Lucene.Net");Type deletionPolicyType = Type.GetType(deletionPolicyName);if (deletionPolicyType == null){throw new Exception("Unrecognized deletion policy type '" + deletionPolicyName + "'");}else if (deletionPolicyType.Equals(typeof(NoDeletionPolicy))){return NoDeletionPolicy.INSTANCE;}else{try{return (IndexDeletionPolicy)Activator.CreateInstance(deletionPolicyType);}catch (Exception e){}}}