# هل هناك أي طريقة لاستخراج دفعة واحدة لجميع المواضيع/المنشورات والرسائل الخاصة بكلمة مفتاحية معينة؟

**URL:** https://meta.discourse.org/t/is-there-any-way-to-pull-in-bulk-all-topics-posts-and-dms-with-a-certain-keyword/176159
**Category:** Data & reporting
**Tags:** sql-query
**Created:** [14 يناير 2021، 10:53م UTC](https://meta.discourse.org/t/is-there-any-way-to-pull-in-bulk-all-topics-posts-and-dms-with-a-certain-keyword/176159 "2021-01-14T22:53:43Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [14 يناير 2021، 11:09م UTC](https://meta.discourse.org/t/is-there-any-way-to-pull-in-bulk-all-topics-posts-and-dms-with-a-certain-keyword/176159/2 "2021-01-14T23:09:43Z")

</div>

> [@KLK، منشور:1، موضوع:176159](#):
>
> هل توجد أي طريقة، بخلاف استخدام البحث فقط، لاستخراج جميع المحادثات والمواضيع والمنشورات والرسائل الخاصة التي تتضمن كلمات مفتاحية محددة؟

يُعد استعلام مستكشف البيانات هذا نقطة انطلاق جيدة: [Search for keywords across posts](https://meta.discourse.org/t/search-for-keywords-across-posts/134553). وهو يستخرج فقط معرفات المنشورات. يمكن تعديل الاستعلام لاستخراج محتوى المنشور أيضًا. على سبيل المثال:

```sql
-- [params]
-- string :query

SELECT p.id as post_id, p.raw FROM posts p
LEFT JOIN post_search_data psd ON psd.post_id = p.id
WHERE psd.search_data @@ TO_TSQUERY(:query)

```

---

_[View the full topic](https://meta.discourse.org/t/is-there-any-way-to-pull-in-bulk-all-topics-posts-and-dms-with-a-certain-keyword/176159)._
