Chapter 7. Relationships and Geo Queries

In this chapter, we will cover the following recipes:

  • Using the has_child query
  • Using the has_parent query
  • Using the nested query
  • Using the geo_bounding_box query
  • Using the geo_polygon query
  • Using the geo_distance query
  • Using the geo_distance_range query
  • Using the geo_hash query

Introduction

In this chapter, we will explore special queries that work on the relationship between Elasticsearch documents and geolocation ones.

When we have a parent-child relation, we can use special queries to query for a similar relation. Elasticsearch doesn't provide the SQL join, but it lets you search child documents starting from a parent or getting a parent starting from the children.

In this chapter, we also see how to query nested objects via a nested query.

The last part of the chapter is related to geolocalization queries that provide queries based on the distance, box, and polygon for matching documents that meet this criterion.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.218.226