I am a newbie to ElasticSearch and tried this first one via curl
curl -XPUT "http://localhost:9200/movies/movie/1" -d'
{
"title": "The Godfather",
"director": "Francis Ford Coppola",
"year": 1972,
"genres": ["Crime", "Drama"]
}'
But I am getting the following error
{"error":"MapperParsingException[failed to parse]; nested: ElasticsearchParseException[Failed to derive xcontent from (offset=0, length=1): [39]]; ","status":400}curl: (3) [globbing] unmatched brace in column 1 url: (3) [globbing] bad range in column 72
It seems to work for me. I'd try typing this character by character
straight into the command line just to make sure nothing "invisible" is
interfering with the text. This sometimes happens when I copy-paste from a
different app into the shell command line.
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.