XML Wikipediaのダンプをロードします: http://ftp.acc.umu.se/mirror/wikimedia.org/dumps/enwiki/20171001/enwiki-20171001-pages-articles.xml.bz2 をElasticsearch(5.6.4)にロードします。 しかし、私が見つけたすべてのツールとチュートリアルは古く、私のElasticsearchバージョンと互換性がありません。 ダンプをElasticsearchにインポートする最良の方法は誰でも説明できますか?Wikipediaを読み込んでElasticsearchにダンプします
0
A
答えて
1
2年前、ウィキメディアは生産弾性検索インデックスのダンプを利用可能にしました。
インデックスは毎週エクスポートされ、各ウィキには2つのエクスポートがあります。
The content index, which contains only article pages, called content;
The general index, containing all pages. This includes talk pages, templates, etc, called general;
、あなたのニーズに応じてマッピングを作成し、ここでhttp://dumps.wikimedia.org/other/cirrussearch/current/
それらを見つけることができます。たとえば、次のように
{ "mappings": { "page": { "properties": { "auxiliary_text": { "type": "text" }, "category": { "type": "text" }, "coordinates": { "properties": { "coord": { "properties": { "lat": { "type": "double" }, "lon": { "type": "double" } } }, "country": { "type": "text" }, "dim": { "type": "long" }, "globe": { "type": "text" }, "name": { "type": "text" }, "primary": { "type": "boolean" }, "region": { "type": "text" }, "type": { "type": "text" } } }, "defaultsort": { "type": "boolean" }, "external_link": { "type": "text" }, "heading": { "type": "text" }, "incoming_links": { "type": "long" }, "language": { "type": "text" }, "namespace": { "type": "long" }, "namespace_text": { "type": "text" }, "opening_text": { "type": "text" }, "outgoing_link": { "type": "text" }, "popularity_score": { "type": "double" }, "redirect": { "properties": { "namespace": { "type": "long" }, "title": { "type": "text" } } }, "score": { "type": "double" }, "source_text": { "type": "text" }, "template": { "type": "text" }, "text": { "type": "text" }, "text_bytes": { "type": "long" }, "timestamp": { "type": "date", "format": "strict_date_optional_time||epoch_millis" }, "title": { "type": "text" }, "version": { "type": "long" }, "version_type": { "type": "text" }, "wiki": { "type": "text" }, "wikibase_item": { "type": "text" } } } }
}
あなたがちょうど入力したインデックスを作成した後:
zcat enwiki-current-cirrussearch-general.json.gz | parallel --pipe -L 2 -N 2000 -j3 'curl -s http://localhost:9200/enwiki/_bulk --data-binary @- > /dev/null'
をお楽しみください!
関連する問題
- 1. wikipediaデータベースの読み込みをダンプする - navicatを殺す - 誰でもアイデアがありますか?
- 2. Wikipediaのページを読み込んでローカルに印刷
- 3. Wikipedia API XMLHttpRequestが読み込めません
- 4. マルチストリームWikipediaダンプ
- 5. データベース全体をsqlalchemyで読み込み、JSONとしてダンプします
- 6. AWS ElasticSearchストリーミングデータを読み込み
- 7. PyYAML:yamlファイルを読み込んでダンプし、タグを保持する(!CustomTag)
- 8. PerlはWikipediaのページを読み込まない?
- 9. WikipediaのインデックスをElasticsearchにインポート
- 10. wikipedia json.gzをelasticsearchに一括アップロードできません
- 11. 読み込み時にGridviewを読み込めません
- 12. ApacheハイブからElasticSearchにデータを読み込むことができません -
- 13. ajaxでページを読み込み、読み込んだページアンカーにスクロール
- 14. Perlループが読み込みファイルを読み込んでいませんか?
- 15. Jqueryを読み込み、読み込んだコンテンツを編集します
- 16. PHPでcsvファイルを読み込んで読み込み
- 17. NSURLSession/NSURLConnection HTTP読み込みに失敗しました(kCFStreamErrorDomainSSL、-9814).Webviewを読み込んでいますか?
- 18. LogStashを使用してElasticSearchでcsvを読み込む
- 19. はelasticsearchのデモデータを読み込むことができません
- 20. wikipediaすべてのページタイトルとページIDをダンプします
- 21. 文字列で読み込んだ後xmlファイルを読み込みます。
- 22. Python 3.5 DLLでcv2を読み込めません。読み込みに失敗しました。
- 23. Javaでリフレクションを使用して読み込んだクラスの読み込みクラスの読み込み
- 24. ElementTree要素のダンプや書き込みができません
- 25. AJAXをワードプレスでさらに読み込んでクエリします
- 26. Elasticsearchがliquibaseによって読み込まれたデータで動作しない
- 27. Android Studioでプロジェクトを読み込む際にエラーが発生しました:モジュールを読み込めません
- 28. Fortranストリームを正しく使用して整数の配列を読み込んで読み込みます
- 29. XMLドキュメントを読み込んで読み込む方法
- 30. iFrameがURLを読み込んでいますが、他のURLを読み込んでいます