Hello,
I would like to parse a JSON file with ElasticSearch.
In which directory must I put this file ?
Because when I execute this command:
POST /eurogiciel/test/ --data-binary @test.json
or
POST /eurogiciel/test/ -d @test.json
In my SENSE dashboard,I've got this error message :
{"error": "MapperParsingException[failed to parse]; nested:
ElasticsearchParseException[Failed to derive xcontent]; ",
"status": 400}
NB: my test.json file contains :
{"title": "billy","amount": 5.7}
But even else where, my curl command doesn't work as I described the error message.
So my question is : where am I supposed to put the files I want to import into ElasticSearch ?
Is the data directory (C:\Program Files (x86)\elasticsearch-1.7.2\data) expected to store this files ?
when you use a curl function curl -XPOST 'http://jfblouvmlxecs01:9200/test/test/1' -d @lane.json > that means that jane.json is in the current file where you made your curl ! but how says @dadoonet this is not about ES but about how execute commands !
go to C:\Program Files (x86)\elasticsearch-1.7.2\ (your json is hear, ex : test.json)
Ok I understand.
I executed my command curl via windows console like this :
C:\Program Files (x86)\elasticsearch-1.7.2\data>curl -XPOST 'http://localhost:9200/eurogiciel/cv/1' -d @test.json
but this message error appears:
'curl' is not a command...
So I've download curl.exe with GOW (version Gow-0.7.0.exe)
And my command curl did work !!
Thank you very much
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.