public void Merge(IndexDocumentField field)
 {
     foreach (var value in field.Values)
     {
         Values.AddDistinct(value);
     }
 }
示例#2
0
        public virtual void Add(IndexDocumentField field)
        {
            var existingField = Fields.FirstOrDefault(f => f.Name.Equals(field.Name, StringComparison.OrdinalIgnoreCase));

            if (existingField != null)
            {
                existingField.Merge(field);
            }
            else
            {
                Fields.Add(field);
            }
        }