# 如何查询群组消息

**URL:** <https://meta.discourse.org/t/how-to-query-the-group-messages/235073>\
**Category:** Support\
**Created:** [2022年八月4日 01:59 UTC](https://meta.discourse.org/t/how-to-query-the-group-messages/235073 "2022-08-04T01:59:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyphalos](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@hyphalos](https://meta.discourse.org/u/hyphalos)\
**Post date:** [2022年八月4日 01:59 UTC](https://meta.discourse.org/t/how-to-query-the-group-messages/235073/1 "2022-08-04T01:59:13Z")

</div>

您好，Discourse 团队：

我们正在尝试查找一种查询特定群组内所有消息的方法。查看数据库表后，我们发现没有消息表。我假设消息只是对特定群组私有的主题，是这样吗？如果是，我们该如何查询？

谢谢！

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2022年八月4日 05:17 UTC](https://meta.discourse.org/t/how-to-query-the-group-messages/235073/2 "2022-08-04T05:17:53Z")

</div>

这需要是一个查询，还是使用搜索就足够了？（例如使用搜索过滤器 `group_messages:GROUPNAME` 或 `group:GROUPNAME`）

不过，回答这个问题；常规和个人消息主题都在 `topics` 表中，并且有一个你可以查询的“archetype”。👍 （所有帖子都在 `posts` 表中）

---

<div class="post-metadata">

**Author:** ![hyphalos](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@hyphalos](https://meta.discourse.org/u/hyphalos)\
**Post date:** [2022年八月5日 01:35 UTC](https://meta.discourse.org/t/how-to-query-the-group-messages/235073/3 "2022-08-05T01:35:35Z")

</div>

感谢您的回复@JammyDodger，我会尝试一下，并告知您结果！
