Hi,
Here is the curl command that I'm using to create an index with geo_point mapping in elasticsearch. The command works fine in elasticsearch 6.8.2, but fails to execute in 7.3.0.
command:
curl -H "Content-Type: application/json" -XPUT 'http://x.x.x.x/final' -d '
{
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
},
"mappings" : {
"sales" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}'
Error: curl: (7) couldn't connect to host
there is no problem with the connection to elasticsearch instance. I can create an index without the mappings.
I was able to execute and create the index from Kibana Dev Tools.
The PUT looks like:
PUT testIndex
{
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
},
"mappings" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}'
But, still not able to create the index with curl command.
Did the curl command change?
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.