ngageoint / elasticgeo

ElasticGeo provides a GeoTools data store that allows geospatial features from an Elasticsearch index to be published via OGC services using GeoServer.
GNU General Public License v3.0
169 stars 85 forks source link

Aggregation Exception #90

Closed dclemenzi closed 5 years ago

dclemenzi commented 5 years ago

The following exception is thrown when using this library against a 5.4 server with aggregation hints:

Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "doc_count_error_upper_bound" (class mil.nga.giat.data.elasticsearch.ElasticAggregation), not marked as ignorable (one known property: "buckets"])

This is a simple fix by adding the following (along with getters and setters) to ElasticAggregation:

private int doc_count_error_upper_bound;
private int sum_other_doc_count;

Already have this change locally and wanted to make sure I am not missing something. Maybe there is a different approach?