Bird
0
0

You want to find all documents where a geo_shape field intersects with a given polygon. Which query type should you use?

hard🚀 Application Q8 of 15
Elasticsearch - Mappings and Data Types
You want to find all documents where a geo_shape field intersects with a given polygon. Which query type should you use?
Aterm query on the geo_shape field
Bgeo_shape query with relation set to 'intersects'
Cgeo_distance query with distance set to polygon bounds
Dmatch query on the geo_shape field
Step-by-Step Solution
Solution:
  1. Step 1: Identify query for geo_shape intersection

    The geo_shape query supports spatial relations like 'intersects' to find overlapping shapes.
  2. Step 2: Exclude other query types

    geo_distance works with points, term and match queries are for text, not spatial relations.
  3. Final Answer:

    geo_shape query with relation set to 'intersects' -> Option B
  4. Quick Check:

    Intersecting shapes = geo_shape query with 'intersects' [OK]
Quick Trick: Use geo_shape query with 'intersects' for polygon overlap [OK]
Common Mistakes:
MISTAKES
  • Using geo_distance for shapes
  • Trying term or match queries on geo_shape
  • Not setting relation parameter

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes