Mapping data error

Good morning, I am trying to index JSON-LD information to visualize it later. When I edit the mapping I get an error. Before doing it I tested with JSON information and it has left me without problem to edit the location field of float to geo_point and then display the points on the map. I attach the code that I am indexing along with the appropriate explanations.

PUT prueba1
POST prueba1/_doc
{
"@context": {
"hasGeometry": {
"@id": "http://www.opengis.net/ont/geosparql#hasGeometry",
"@type": "@id"
},
"codigoINE": "http://vocab.linkeddata.es/datosabiertos/def/sector-publico/territorio#codigoINE",
"title": "http://purl.org/dc/terms/title",
"identifier": "http://purl.org/dc/terms/identifier",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#date"
},
"asWKT": {
"@id": "http://www.opengis.net/ont/geosparql#asWKT",
"@type": "http://www.opengis.net/ont/geosparql#wktLiteral"
},
"geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
"geosparql": "http://www.opengis.net/ont/geosparql#",
"sf": "http://www.opengis.net/ont/sf#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"owl": "http://www.w3.org/2002/07/owl#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"georec": "https://datos.ign.es/recurso/btn100/comunidad-autonoma/",
"esadm": "http://vocab.linkeddata.es/datosabiertos/def/sector-publico/territorio#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"foaf": "http://xmlns.com/foaf/0.1/",
"dc": "http://purl.org/dc/terms/"
},
"graph": {
"@id": "georec:andalucia",
"@type": "esadm:ComunidadAutonoma",
"created": "2014-06-17",
"identifier": "andalucia",
"business_latitude": "41.37872914",
"business_location": [
-0.7639373,
41.3787291
],
"business_longitude": "-0.7639373",
"cod_ca": "ES-AN",
"title": "Andalucía",
"codigoINE": "01",
"hasGeometry": "georec:andalucia/geometry",
"@id_geo": "georec:andalucia/geometry",
"@type_geo": "sf:MultiPolygon"
}
}

this is the information I want to index and I want to modify the field business_location (float --> geo_point)

Then I modify the mapping changing float to geo_point.
I get the mapping and receive the error:

GET prueba1/_mapping

***************************** ERROR**************************************
{
"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: mapping type is missing;"
}
],
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: mapping type is missing;"
},
"status": 400
}

*************************** ERROR ***************************************

Only I want to replace business_location from float to geo_point to visualize with a point in the map. I don´t know really if I´m doing correctly when editing the mapping.

thanks in advance for your time and help!

Sergio

I got it ^^

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.