NEST Driver is adding extra "pattern" element to "include"

Howdy,

I'm having an issue with using Include element from DSL in Nest syntax.

When Nest request is serialized it adds extra "pattern" element in DSL which prevents aggs below from being evaluated:

Nest Syntax:

Func<AggregationContainerDescriptor, IAggregationContainer> catPathagg = oo => oo.Terms("catpaths", term => term
   .Field("categories.categoryPath")
   .Aggregations(depthAgg)
   .Include(@"(/[^/]+){2}","")
   );

DSL generated:

"aggs": { "catpaths": {
   "terms": {
   "field": "categories.categoryPath",
   "include": {
   "pattern": "(/[^/]+){2}"
   }
   },
   "aggs"...

Additional "pattern" element stops parser with continuing with next aggregation.

The DSL that I'm expecting and is working for me is the following:

"aggs": {
"catpaths": {
"terms": {
"field": "categories.categoryPath",
"include": "(/[^/]+){2}"
},
"aggs"...

Extra "pattern" element is really problematic in nested aggregation. It only works if it's included in the last aggregate element.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.