# Yahoo Groups のインポートでトピックを親にまとめてマージする方法は？

**URL:** <https://meta.discourse.org/t/how-to-mass-merge-topics-into-parents-for-a-yahoo-groups-import/136555>\
**Category:** Migration\
**Created:** [2019 年 12 月 19 日午後 10:03 UTC](https://meta.discourse.org/t/how-to-mass-merge-topics-into-parents-for-a-yahoo-groups-import/136555 "2019-12-19T22:03:35Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2019 年 12 月 20 日午後 10:08 UTC](https://meta.discourse.org/t/how-to-mass-merge-topics-into-parents-for-a-yahoo-groups-import/136555/7 "2019-12-20T22:08:42Z")

</div>

> [@Soretna](#):
>
> @pfaffman 現在、このような処理をプログラムで実行する方法をご存知ですか？

最初からやり直して、インポートを正しく行うことをお勧めします。@tobiaseigen が提案された方法は有望に思えます。大規模な mbox インポートを行ったのはかなり前になりますが、その際は、ご指摘のような問題を事前に修正するための作業を多く行いました。それが選択肢としてできない場合、Rails 側で何らかの方法で関連する投稿をすべて収集し、日付でソートして新しいトピックを作成（または最初のトピックを選択）し、すべての投稿をその新しいトピックに移動させるというアプローチを試すことができます。

実際のコードを提示するには、少し時間がかかるでしょう。

---

_[View the full topic](https://meta.discourse.org/t/how-to-mass-merge-topics-into-parents-for-a-yahoo-groups-import/136555)._
