Import CSV file

Hello,

i am new to elasticsearch and i am trying to import a csv file.
can anyoone help?

an example csv file :
name comment
me hello

json file
{
"type" : "csv",
"csv_file" : {
"folder" : "~/test",
"filename_mask" : ".*\.csv$",
"poll":"5m",
"fields" : [
"name",
"comment",
],
"field_separator" : " ",
"escape_character" : ";",
"quote_character" : "'"
},
"index" : {
"index" : "eriks import",
"type" : "csv_row",
"bulk_size" : 10000,
"bulk_threshold" : 50
}
}

but i get an error when i do :

curl -XPOST http://localhost:9200/_river/my_csv_river/_meta -d

insertrivercsv.json

i get :
{"error":"MapperParsingException[failed to parse]; nested:
ElasticSearchParseException[Failed to derive xcontent from (offset=0,
length=19): [105, 110, 115, 101, 114, 116, 114, 105, 118, 101, 114, 99,
115, 118, 46, 106, 115, 111, 110]]; ","status":400}[

what does this mean?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d5d95d5e-e3b3-493c-8e7b-302728bc40d3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

If you use curl, then check the parameters for sending valid input. You
certainly want something like this

curl -XPOST http://localhost:9200/_river/my_csv_river/_meta --data-binary
@insertrivercsv.json

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH3%3DryJY%2BZbayHNCodyu0BXWkSuK8P_nFehduC%3DgymrPg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Is the @ important?

when i use the command you send i get:

curl -XPOST http://localhost:9200/_river/my_csv_river/_meta --data-binary

@insertrivercsv.json
Warning: Couldn't read data from file "insertrivercsv.json", this makes an
Warning: empty POST.
{"error":"MapperParsingException[failed to parse, document is
empty]","status":400}

Op dinsdag 11 februari 2014 13:58:32 UTC+1 schreef Jörg Prante:

If you use curl, then check the parameters for sending valid input. You
certainly want something like this

curl -XPOST http://localhost:9200/_river/my_csv_river/_meta --data-binary
@insertrivercsv.json

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9cadc170-dac1-40d2-9b15-17fecbf2168a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Read the curl man page for sending a file with @

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFQotOMXzAuCGa4Beq6gsewkGUivOJLj8vOyytNXVha7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.