opensearch-project / user-behavior-insights

User Behavior Insights plugin for OpenSearch
Apache License 2.0
17 stars 2 forks source link

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

Closed jzonthemtn closed 3 months ago

jzonthemtn commented 3 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.