NEST/Elasticsearch.Net version: v5.2.0
Elasticsearch version: v5.2.2
Description of the problem including expected versus actual behavior:
The SignificantTerms aggregation should be able to take a List<string> in the exclude/include parameters to produce:
"significant_terms": {
"field": "activityNames.keyword",
"exclude":
[
"Cardio Pulse",
"Strength & Core",
"Power",
"Dance Step",
"Hatha Yoga"
]
}
Now the exclude/include parameters only accepts FluentDictionary<string,string> which produces:
"significant_terms": {
"field": "activityNames.keyword",
"exclude": {
"Cardio Pulse": "Cardio Pulse",
"Strength & Core": "Strength & Core",
"Power": "Power",
"Dance Step": "Dance Step",
"Hatha Yoga": "Hatha Yoga"
}
}
This throws:
{
"type": "parsing_exception",
"reason": "[significant_terms] failed to parse field [exclude]",
"line": 10,
"col": 27
}
Having FluentDictionary<string,string> makes sens in include parameter for the Terms aggregation when running the partition feature:
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_filtering_values_with_partitions
Steps to reproduce:
SignificantTerms aggregation with a dictionary in exclude parameter.I'm having a similar issue with include in the AggregationContainerDescriptor.
Include accepts
IEnumerable<string> values
string includePattern, string regexFlags
long partion, long numberOfPartitions
I want include to produce DSL:
"include": "(/[^/]+){2}"
All I can produce is:
"include":{"pattern":"(/[^/]+){2}"}}
"include": ["(/[^/]+){2}"]
Yes, you are correct. I'm having the same issues when testing Terms aggregation with include parameter. I'm also getting invalid DSL when using include parameter in aggregations and a query.
@jhellemann, @wolczas thanks for reporting; this is a bug 馃悰
Looking at a fix for the next release.
Closed via #2696
Most helpful comment
@jhellemann, @wolczas thanks for reporting; this is a bug 馃悰
Looking at a fix for the next release.