Geo-point and Geo-shape Types in Elasticsearch
📖 Scenario: You are working on a location-based service that stores places and their areas on a map. You want to use Elasticsearch to store and search these locations efficiently.
🎯 Goal: Build an Elasticsearch index mapping that uses geo_point for storing exact locations and geo_shape for storing areas. Then, add sample documents and query them.
📋 What You'll Learn
Create an index mapping with
location as geo_pointAdd
area field as geo_shapeIndex sample documents with both fields
Query documents by location and shape
💡 Why This Matters
🌍 Real World
Location-based apps like delivery services, real estate, or mapping use geo_point and geo_shape to store and search places and areas.
💼 Career
Understanding geo data types in Elasticsearch is important for backend developers and data engineers working on geospatial search and analytics.
Progress0 / 4 steps