# 社区 Data Explorer 查询的组织

**URL:** https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213
**Category:** Site feedback
**Tags:** data-explorer
**Created:** [2020年十一月24日 20:11 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213 "2020-11-24T20:11:44Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2020年十一月24日 20:11 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/1 "2020-11-24T20:11:44Z")

</div>

我们目前在 [meta.discourse.org](http://meta.discourse.org) 上似乎还没有一个 [Data Explorer](https://meta.discourse.org/t/32566?silent=true) 查询的实时库。解决这个问题是否值得？

此处提到的主题内容杂乱无章，且已被关闭：

> [@riking](#):
>
> 我们的社区可以帮到您！😉  
> 请随意从此处导入任意数量的查询：[你们想出了哪些酷炫的 Data Explorer 查询？](https://meta.discourse.org/t/what-cool-data-explorer-queries-have-you-come-up-with/43516/)

@SidV 在 GitHub 上建立了一个很棒的集合：

> <https://github.com/SidVal/discourse-data-explorer/blob/queries/querys.md>

现在是不是在 Meta 上建立一个由社区管理的库的合适时机？我认为许多人会觉得这很有用。

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2020年十一月24日 20:17 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/2 "2020-11-24T20:17:10Z")

</div>

> [@nathank](#):
>
> 此处提及的主题内容杂乱无章，已因混乱而被关闭：

是的，该主题收到了太多问题和回复，导致无法阅读。

> [@nathank](#):
>
> 现在是时候在 Meta 上建立一个由社区管理的库了吗？我认为许多人会觉得这很有用。

我也这么认为。有人对如何在此站点上组织 [Data Explorer](https://meta.discourse.org/t/32566?silent=true) 查询有想法吗？理想情况下，应该能够通过搜索几个关键词来查找现有的查询。

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [2020年十一月24日 20:38 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/3 "2020-11-24T20:38:28Z")

</div>

几点想法：

1. 我们可以设立一个单独的类别，每个主题对应一个查询。为避免杂乱，新主题可能需要工作人员审批。
2. 也可以仅为单个主题添加 `data-explorer-query` 标签。这些主题可以放在 #howto:tips-and-tricks 中。

---

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [2020年十一月26日 01:40 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/4 "2020-11-26T01:40:11Z")

</div>

> [@nathank](#):
>
> (…) GitHub 上很棒的合集

感谢邀请我分享 😌

我乐于调整 GitHub 上查询列表的分类方式。或许我们可以先共同思考一下分类方案，在充分调试好各个类别后，再将其迁移到这里的 Meta 讨论区（？）。

欢迎随时提交 PR。

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2020年十一月26日 04:35 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/5 "2020-11-26T04:35:04Z")

</div>

> [@SidV](#):
>
> 我乐意考虑更改 GitHub 上查询列表的分类方式

我之前没意识到每个查询都可以作为 PR（拉取请求）提交、进行 Fork 等等。这真的很酷，我也能理解你们为什么这么做。不过，对于不太懂技术的人来说，这可能会造成困惑。所有 Discourse 管理员都熟悉 Discourse，但只有一部分人熟悉 GitHub。

你说的「分类」具体是指什么？我觉得用标签（tags）来处理这方面会很合适。

> [@justin](#):
>
> 1. 我们可以设立一个单独的分区，每个主题包含一个查询。可以要求管理员对新主题进行审核，以避免杂乱。
> 2. 也可以简单地使用 `data-explorer-query` 标签来标记单独的主题。这些主题可以放在 #howto:tips-and-tricks 分区下。

我认为将其放在 #Customization > Plugin 分区下的一个专用子分区是最好的选择。

1. 如果我们采用每个主题一个查询的方式，将会产生大量主题。@SidV 已经有超过 70 个了，外面还有更多。这将严重污染/淹没 #howto:tips-and-tricks 分区！
2. 这将使得每个主题都可以设置为 Wiki，配置为「跳转到首帖」，并拥有一个作为模板的建议结构。
3. 它还将与 #Customization > Plugin 分区的配置保持一致，这样看起来很协调！

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [2020年十一月26日 16:45 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/6 "2020-11-26T16:45:32Z")

</div>

我建议将所有有用且高效的查询整合到一个主题中，随后将其锁定。

该主题将成为经过验证查询的“唯一真实来源”。

此后，我们可以对添加到该主题中的条目结构稍加严格。每个条目都应包含一个描述性的标题、一段简短的功能说明，并提及作者以表致谢。

完成这一步后，我们可以在该主题中添加目录，其中为每个查询设置一个标题。

针对 Simon 在此处的担忧：

> [@simon](#):
>
> 理想情况下，应能通过搜索几个关键词来查找现有查询。

新版目录组件将配备一个实时、位于帖子内的搜索栏，可搜索每个部分的标题和内容，效果如下所示。

（暂且忽略样式，目前仍在开发中）

新版组件预计将在今年年底左右具备生产环境就绪条件。

至于分享、建议或请求新查询的流程，我们可以为此创建一个新主题。在该主题中分享的优秀查询随后将被添加到包含目录的“唯一真实来源”主题中。

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2020年十一月27日 00:11 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/7 "2020-11-27T00:11:13Z")

</div>

我觉得更合适的做法是制定一个流程，用于将查询打包到数据资源管理器中。

可以创建一个带有 #Contribute > Feature 标签的 #data-explorer #candidate-query，并附上候选查询。该功能说明应解释为何需要打包，以及其独特性和重要性。

然后我们判断该提议是否有效，若有效则打包查询并关闭该议题。

当然，如果你真的想看，也可以随时浏览那些被拒绝的打包请求。

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2020年十二月2日 20:18 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/8 "2020-12-02T20:18:00Z")

</div>

> [@sam](#):
>
> 我觉得更明智的做法是探索一种将查询打包到数据探索器中的流程。

在数据探索器中扩展原生的查询功能，无疑会对许多管理员和用户提供极大的帮助，并提升其易用性。

不过，我认为同样存在对“二级”查询的需求，以及一个专门讨论这些查询的结构化场所。我来元讨论区是为了寻找解决自身问题的方案，而非单纯为了贡献巧妙的查询。

也许可以将 @sam 和 @Johani 的方法结合起来？创建一个子分类，其中包含一些被标记为“官方”的主题或查询，并将它们与插件捆绑发布。

---

<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: [2023年八月13日 19:21 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/9 "2023-08-13T19:21:57Z")

</div>

关于此问题的一个小更新——我们现在有了一个 #Data & reporting 类别。🎉 🙂

> **[Data & reporting](https://meta.discourse.org/c/data-reporting/148)**
>
> This is the category for everything related to Discourse data and reporting. Here, you can discuss dashboard reports, custom badge queries, data-explorer queries and any other analytic add-ons.

我会回顾一下这个话题中的建议，看看还有没有其他可以借鉴的想法。🙂

---

<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: [2023年八月13日 19:22 UTC](https://meta.discourse.org/t/organization-of-community-data-explorer-queries/171213/10 "2023-08-13T19:22:02Z")

</div>

对话继续于 [Could we re-open the topic to share Explorer queries?](https://meta.discourse.org/t/could-we-re-open-the-topic-to-share-explorer-queries/274314)
