AgileWorksOrg / elasticsearch-river-csv

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

Importing CSV doesn't create any elastic search documents.. #1

Closed sairamc closed 11 years ago

sairamc commented 11 years ago

Could you post a sample csv and the _river for that csv. I was able to create a river but the documents are not getting created. Looks like river is processing the csv file and adds .processing.imported at the end of the file, but I cannot find the contents of that csv in my elastic search.

I'm using elastic search 0.20.5

Thanks

xxBedy commented 11 years ago

I will add sample to doc. Can you send me your sample to check where is problem.

Odesláno z iPhonu

    1. 2013 v 23:54, sairamc notifications@github.com:

Could you post a sample csv and the _river for that csv. I was able to create a river but the documents are not getting created. River process the csv file and adds .processing.imported at the end of the file. But I cannot find the contents of that csv in my elastic search.

Thanks

— Reply to this email directly or view it on GitHub.

digitalrinaldo commented 11 years ago

I have the same issue. I can help debug. Can you suggest what to turn on for debugging? I am seeing the following in the log

[2013-03-14 14:23:39,371][WARN ][river.csv ] [dev-es-1] [csv][descriptions] failed to execute bulk

Thanks for this plugin -- it is of great value.

sairamc commented 11 years ago

Here is my curl for metadata:

curl -XPUT localhost:9200/_river/my_river_csv/_meta -d ' { "type" : "csv", "csv_file" : { "folder" : "/Users/XXX/Desktop/elastic", "filename_mask" : ".*.csv$", "poll":"5m", "fields" : [ "entity_id", "entity_name" ], "field_separator" : ",", "escape_character" : ";", "quote_character" : "\"" }, "index" : { "index" : "jetsetter", "type" : "entities", "bulk_size" : 10000, "bulk_threshold" : 50 } }'

Filename "entities.csv" and the contents are:

"1","Foo" "2","Bar" "3","Baz"

Thanks,

xxBedy commented 11 years ago

Hi,

Do you have index mapping created, also ?

Bedy

    1. 2013 v 16:40, sairamc notifications@github.com:

Here is my curl for metadata:

curl -XPUT localhost:9200/_river/my_river_csv/_meta -d ' { "type" : "csv", "csv_file" : { "folder" : "/Users/XXX/Desktop/elastic", "filename_mask" : ".*.csv$", "poll":"5m", "fields" : [ "entity_id", "entity_name" ], "field_separator" : ",", "escape_character" : ";", "quote_character" : "\"" }, "index" : { "index" : "jetsetter", "type" : "entities", "bulk_size" : 10000, "bulk_threshold" : 50 } }'

Filename "entities.csv" and the contents are:

"1","Foo" "2","Bar" "3","Baz"

Thanks,

— Reply to this email directly or view it on GitHub.

sairamc commented 11 years ago

No. I don't have any mappings, using defaults. I tried creating mappings too, but no luck.

curl -XPUT 'http://localhost:9200/jetsetter/entities/_mapping' -d ' { "entities" : { "properties" : { "entity_id" : {"type" : "string", "store" : "yes"}, "entity_name" : {"type" : "string", "store" : "yes"} } } }'

Thanks.

adgonzal commented 11 years ago

I think there is not a problem with the river. Maybe you need to verify the bulk_size and bulk_threshold parameters since the plugin caches all the items in the file and it only updates when the number of items in the cache is bigger than the bulk_size.

sairamc commented 11 years ago

@adgonzal - Thanks for the reply. That did the trick.