Complete the code to define a geo-point field in the mapping.
{
"mappings": {
"properties": {
"location": {
"type": "[1]"
}
}
}
}The geo_point type is used to store latitude and longitude coordinates for geo-location queries.
Complete the code to define a geo-shape field in the mapping.
{
"mappings": {
"properties": {
"area": {
"type": "[1]"
}
}
}
}The geo_shape type is used to store complex shapes like polygons, lines, and circles.
Fix the error in the geo-point document by completing the coordinates array correctly.
{
"location": {
"type": "point",
"coordinates": [[1]]
}
}Geo-point coordinates must be an array with longitude first, then latitude, as numbers.
Fill both blanks to create a geo-shape polygon with the correct type and coordinates.
{
"area": {
"type": "[1]",
"coordinates": [2]
}
}The polygon type requires coordinates as an array of linear rings (arrays of points). The outer array wraps the ring.
Fill all three blanks to define a geo-shape circle with the correct type, coordinates, and radius.
{
"area": {
"type": "[1]",
"coordinates": [2],
"radius": "[3]"
}
}A geo-shape circle requires type as 'circle', coordinates as [longitude, latitude], and radius as a string with units.