# The best way to create aggregated metadata for a Topic based on its messages?

**URL:** https://meta.discourse.org/t/the-best-way-to-create-aggregated-metadata-for-a-topic-based-on-its-messages/56464
**Category:** Feature
**Created:** [27 בינואר,‏ 2017,‏ 3:04pm UTC](https://meta.discourse.org/t/the-best-way-to-create-aggregated-metadata-for-a-topic-based-on-its-messages/56464 "2017-01-27T15:04:26Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![skozz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/skozz/32/119704_2.png) [@skozz](https://meta.discourse.org/u/skozz)
#### Post date: [27 בינואר,‏ 2017,‏ 3:04pm UTC](https://meta.discourse.org/t/the-best-way-to-create-aggregated-metadata-for-a-topic-based-on-its-messages/56464/1 "2017-01-27T15:04:26Z")

</div>

I have an idea to my community and for a plugin but I’m starting as “discourse plugin developer” and there are too many things to learn yet.

I hope you can help me to see the best way to address my idea. Here we go:

* * *

Let’s say we have a **Topic** called “Review about the new Ford Fusion 2017”, with a normal text and some “fixed” metadata with a rating like:

- Price: 6/10
- Engine: 9/10
- Confort: 8/10
- CO2: 5/10

Then, the community can **Reply** the **Topic** with the same approach: normal text with its comments and fill the same metadata:

- Price: 2/10
- Engine: 4/10
- Confort: 6/10
- CO2: 6/10

At the end, I want to display at the top of the topic the average.

* * *

I hope I explained well, if not I can do a mockup with the feature that I want to create.

Any ideas?

Thank you!

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [27 בינואר,‏ 2017,‏ 3:21pm UTC](https://meta.discourse.org/t/the-best-way-to-create-aggregated-metadata-for-a-topic-based-on-its-messages/56464/2 "2017-01-27T15:21:45Z")

</div>

This is exactly the [Ratings Plugin](https://meta.discourse.org/t/topic-ratings-plugin/39578) but with 4 ratings instead of one.

Use it as a base and extend from there.

---

<div class="post-metadata">

### Author: ![skozz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/skozz/32/119704_2.png) [@skozz](https://meta.discourse.org/u/skozz)
#### Post date: [28 בינואר,‏ 2017,‏ 3:54pm UTC](https://meta.discourse.org/t/the-best-way-to-create-aggregated-metadata-for-a-topic-based-on-its-messages/56464/3 "2017-01-28T15:54:10Z")

</div>

You are right! I’ll try with the plugin, but, the part of calculate and print the average at the top of the Topic?

Thank you so much!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [25 באפריל,‏ 2019,‏ 5:49pm UTC](https://meta.discourse.org/t/the-best-way-to-create-aggregated-metadata-for-a-topic-based-on-its-messages/56464/4 "2019-04-25T17:49:24Z")

</div>



---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [26 באפריל,‏ 2019,‏ 9:33am UTC](https://meta.discourse.org/t/the-best-way-to-create-aggregated-metadata-for-a-topic-based-on-its-messages/56464/5 "2019-04-26T09:33:48Z")

</div>

@skozz did you manage to build your plugin?
