file→ES document not imported
jze opened this issue · comments
Jesper Zedlitz commented
When re-importing data from files only one document ist imported. Here are the steps how I can demonstrate the behaviour:
# Create an index and some demo data
curl -XPUT localhost:9200/myindex
curl -XPUT localhost:9200/myindex/a/1 -d '{"name":"John Doe"}'
curl -XPUT localhost:9200/myindex/a/2 -d '{"name":"John Doe"}'
curl -XPUT localhost:9200/myindex/a/3 -d '{"name":"John Doe"}'
curl -XPUT localhost:9200/myindex/b/4 -d '{"name":"John Doe"}'
curl -XPUT localhost:9200/myindex/b/5 -d '{"name":"John Doe"}'
curl -XPUT localhost:9200/myindex/b/6 -d '{"name":"John Doe"}'
curl -XPUT localhost:9200/myindex/c/7 -d '{"name":"John Doe"}'
curl -XPUT localhost:9200/myindex/c/8 -d '{"name":"John Doe"}'
curl -XPUT localhost:9200/myindex/c/9 -d '{"name":"John Doe"}'
# Export the data into a file
nodejs exporter.js -t file -sh localhost -si myindex -tf /tmp/
# Delete the index
curl -XDELETE localhost:9200/myindex
nodejs exporter.js -s file -th localhost -si myindex -sf /data -ti myindex
Although the original index contained nine documents only one document has been imported:
{
"_index": "newindex",
"_type": "c",
"_id": "9",
"_version": 1,
"_score": 1,
"_source": {
"name": "John Doe"
}