私の研究では、ロシアのWikipediaのダンプをElasticsearch 2.2にインポートする必要があります。しかしダンプをインポートする代わりに、私はWikimedia(http://dumps.wikimedia.org/other/cirrussearch/)が発行したインデックスで作業することに決めました。それを処理するために私は記事https://www.elastic.co/blog/loading-wikipediaを見つけ、問題の著者のスクリプトを使用しようとしました(ちょうどいくつかの輸出文を置き換えました)。私はまた、テストのためだけの著者のスクリプトを使用しようとしたWikipediaのインデックスをElasticsearchにインポート
{
"acknowledged" : true
}
{
"acknowledged" : true
}
{
"error" : {
"root_cause" : [ {
"type" : "action_request_validation_exception",
"reason" : "Validation Failed: 1: mapping source is empty;"
} ],
"type" : "action_request_validation_exception",
"reason" : "Validation Failed: 1: mapping source is empty;"
},
"status" : 400
}
export es=localhost:9200
export site=ru.wikipedia.org
export index=ruwiki
curl -XDELETE $es/$index?pretty
curl -s 'https://'$site'/w/api.php?action=cirrus-settings-dump&format=json&formatversion=2' |
jq '{ analysis: .content.page.index.analysis, number_of_shards: 1, number_of_replicas: 0 }' |
curl -XPUT $es/$index?pretty -d @-
curl -s 'https://'$site'/w/api.php?action=cirrus-mapping-dump&format=json&formatversion=2' |
jq .content |
sed 's/"index_analyzer"/"analyzer"/' |
sed 's/"position_offset_gap"/"position_increment_gap"/' |
curl -XPUT $es/$index/_mapping/page?pretty -d @-
そして結果:しかし、それはステップ2のためのスクリプトの私のバージョンであるステップ2
に問題があります。同じエラーがあります。私は何をすべきかわからない。修正してください。