-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Hi, when i trying to use .Include function of terms aggregation below exception occurs.
[ArgumentException: An item with the same key has already been added.]
I think the cause of this error, function tries to add dictionay to both includepattern and regexflags with same key which is "pattern"
[JsonProperty("include")]
internal IDictionary<string, string> _Include { get; set; }
public TermsAggregationDescriptor<T> Include(string includePattern, string regexFlags = null)
{
this._Include = new Dictionary<string, string> { {"pattern", includePattern}};
if (!regexFlags.IsNullOrEmpty())
this._Include.Add("pattern", regexFlags);
return this;
}
Metadata
Metadata
Assignees
Labels
No labels