Bird
0
0

What is wrong with this Elasticsearch mapping for a geo_shape field named area?

medium📝 Debug Q14 of 15
Elasticsearch - Mappings and Data Types

What is wrong with this Elasticsearch mapping for a geo_shape field named area?

{
  "properties": {
    "area": {
      "type": "geo_point"
    }
  }
}

The data to be stored is a polygon shape.

AThe type should be <code>geo_shape</code> to store polygons.
BThe field name <code>area</code> is invalid for geo data.
CThe mapping must include <code>coordinates</code> property.
DThe type <code>geo_point</code> supports polygons by default.
Step-by-Step Solution
Solution:
  1. Step 1: Check field type for polygon data

    Polygons require geo_shape type, not geo_point.
  2. Step 2: Identify mapping error

    Mapping uses geo_point which only supports single points, so it cannot store polygons.
  3. Final Answer:

    The type should be geo_shape to store polygons. -> Option A
  4. Quick Check:

    Polygon needs geo_shape type = D [OK]
Quick Trick: Polygons need geo_shape, not geo_point [OK]
Common Mistakes:
MISTAKES
  • Using geo_point for polygon shapes
  • Assuming field name affects type
  • Adding coordinates in mapping instead of data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes