opensearch-project / user-behavior-insights

User Behavior Insights plugin for OpenSearch
Apache License 2.0
20 stars 5 forks source link

Change `object_detail` to type `object` to support aggregations #8

Closed jzonthemtn closed 5 months ago

jzonthemtn commented 5 months ago

We need to change event_attributes.object.object_detail from type flat_object to type object because we can't do aggregate calculations, like average price, margin, etc. on a flat_object.

Change

            "object_detail": { "type": "flat_object" }

to

            "object_detail": { "type": "object" }

Credit to @Rasonj for finding this change is needed.