Hi,
I have an index with data that looks like this:
{
"id":"52534",
"name":"foo",
"location":{
"lat":39.18552295869955,
"lon":-104.34581946342342
}
}
I'm attempting to make a mapping for the lat/lon field so I can do
geospatial filters. However I get a weird error when attempting to make the
mapping:
which results in
{
error: "MapperParsingException[Root type mapping not empty after parsing!
Remaining fields: [mappings :
{location={properties={location={type=geo_point}}}}]]"
status: 400
}
When using the put mapping API you do not need to have a mappings object.
Also the type you are defining the mappings for should match the type in
the URL. Your request should work if you try the following:
On Monday, 6 October 2014 16:18:07 UTC+1, Ryan Bergman wrote:
Hi,
I have an index with data that looks like this:
{
"id":"52534",
"name":"foo",
"location":{
"lat":39.18552295869955,
"lon":-104.34581946342342
}
}
I'm attempting to make a mapping for the lat/lon field so I can do
geospatial filters. However I get a weird error when attempting to make the
mapping:
which results in
{
error: "MapperParsingException[Root type mapping not empty after parsing!
Remaining fields: [mappings :
{location={properties={location={type=geo_point}}}}]]"
status: 400
}
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.