Derek Binkley

Add Location-based Searching to Site with ElasticSearch

Go beyond simple text search. Learn to filter results by geographic distance, custom polygons, or bounding boxes with Elasticsearch.

Add Location-based Searching to Site with ElasticSearch
#1about 5 minutes

Understanding the fundamentals of the Elasticsearch search engine

Elasticsearch is a read-optimized search engine based on Apache Lucene that operates via REST calls and is part of the ELK stack.

#2about 2 minutes

Setting up a local development environment with Docker

A local Elasticsearch and Kibana environment can be quickly configured and launched using a simple Docker Compose file.

#3about 6 minutes

Defining data structure with indexes and mappings

Data is organized into JSON documents within an index, and its structure is defined by a mapping that specifies data types like text, keyword, and geo_point.

#4about 11 minutes

Performing basic text searches and filters in Kibana

Use `match` queries for ranked text searching and `filter` queries for exact, non-scored matching, which can be combined using a `bool` query.

#5about 3 minutes

Exploring advanced features and efficient data ingestion

Elasticsearch offers fast performance, advanced features like "more like this" searches, and requires bulk inserts for efficient data loading.

#6about 8 minutes

Finding locations within a specific geographic radius

The `geo_distance` filter allows you to find all documents that fall within a specified circular radius from a central latitude and longitude point.

#7about 5 minutes

Sorting search results by proximity to a point

Instead of just filtering, you can use a `geo_distance` sort to order results by their actual distance from a given point, from nearest to farthest.

#8about 2 minutes

Querying for locations inside a custom polygon shape

The `geo_polygon` filter enables searching for documents whose geo-points fall within a custom shape defined by a series of latitude and longitude coordinates.

#9about 2 minutes

Modifying schemas and handling complex object arrays

You can add new properties to an existing mapping, and the `nested` data type should be used to properly index and query arrays of objects.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.

Data Engineer

Elasticsearch
Municipality of Boadilla del Monte, Spain

40-60K
Senior
Python
Gitlab
Docker
Elasticsearch
+1