Closed taveek closed 10 years ago
I tried to use river-csv with my elastic server, here are my configuration curl -XPUT localhost:9200/_river/postarea/_meta -d ' { "type" : "csv", "csv_file" : { "folder" : "/tmp", "filename_pattern" : "myfile.csv", "first_line_is_header":"true", "poll" : "1m", "charset" : "UTF-8", "script_before_file" : "/tmp/before_file.sh", "script_before_all" : "/tmp/before_file.sh" }, "index" : { "index" : "myindex", "type" : "mytype", "bulk_size" : 100, "bulk_threshold" : 10 } }'
And here are my /tmp/before_file.sh
echo "greetings from shell before all, will process $*"
curl -XDELETE 'localhost:9200/myindex'
touch hex.xxx
Unfortunately neighter 'script_before_file' or 'script_before_all' get executed before myfile.csv get imported.
Anything wrong with my configuration?
After restart elasticsearch, it's working. Thanks for your answer anyway.
good to hear! :+1:
I tried to use river-csv with my elastic server, here are my configuration curl -XPUT localhost:9200/_river/postarea/_meta -d ' { "type" : "csv", "csv_file" : { "folder" : "/tmp", "filename_pattern" : "myfile.csv", "first_line_is_header":"true", "poll" : "1m", "charset" : "UTF-8", "script_before_file" : "/tmp/before_file.sh", "script_before_all" : "/tmp/before_file.sh" }, "index" : { "index" : "myindex", "type" : "mytype", "bulk_size" : 100, "bulk_threshold" : 10 } }'
And here are my /tmp/before_file.sh
!/bin/sh
echo "greetings from shell before all, will process $*"
curl -XDELETE 'localhost:9200/myindex'
touch hex.xxx
Unfortunately neighter 'script_before_file' or 'script_before_all' get executed before myfile.csv get imported.
Anything wrong with my configuration?