AgileWorksOrg / elasticsearch-river-csv

CSV river for ElasticSearch
Apache License 2.0
91 stars 45 forks source link

"script_before_file" doesn't work #40

Closed taveek closed 10 years ago

taveek commented 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

!/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?

vtajzich commented 10 years ago
taveek commented 10 years ago

After restart elasticsearch, it's working. Thanks for your answer anyway.

vtajzich commented 10 years ago

good to hear! :+1: