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

Related Articles

View all articles
CH
Chris Heilmann
Dev Digest 151: SEO in an AI world, security fixes and Doomed PDFs
Inside last week’s Dev Digest 151 . 🔎 How ChatGPT compares to search and what that means for SEO ✂️ Job cuts across the board as companies curb DEI programs 🟨 @Microsoft releases 161 Windows security updates ⚠️ @Google’s OAuth bug endangers million...
Dev Digest 151: SEO in an AI world, security fixes and Doomed PDFs
CH
Chris Heilmann
WeAreDevelopers Dev Digest Issue 116 - The new search wars…
Welcome to edition 116 of the WeAreDevelopers Dev Digest. This time we talk about how the fight for AI and search dominance heats up with Google releasing a lot at their I/O event and OpenAI doing the same a day earlier…News and ArticlesA ton of thin...
WeAreDevelopers Dev Digest Issue 116 - The new search wars…
CH
Chris Heilmann
WeAreDevelopers LIVE days are changing - get ready to take part
Starting with this week's Web Dev Day edition of WeAreDevelopers LIVE Days, we changed the the way we run these online conferences. The main differences are:Shorter talks (half an hour tops)More interaction in Q&AA tips and tricks "Did you know" sect...
WeAreDevelopers LIVE days are changing - get ready to take part
EM
Eli McGarvie
13 Google Search Tips For Developers to Search Like a Pro
Google. We all know it, and we all semi-love it. The product is great, just not a massive fan of all the data privacy stuff. You know, where they read all of your emails and share them with some three-letter agency in America. I guess there are some ...
13 Google Search Tips For Developers to Search Like a Pro

From learning to earning

Jobs that call for the skills explored in this talk.

Backend Developer

Backend Developer

Wikiloc Outdoor Navigation
Municipality of Valencia, Spain

Java
REST
Azure
Linux
NoSQL
+10
Data Engineer

Data Engineer

Searchability
Charing Cross, United Kingdom

Remote
£40-70K
ETL
Python
Docker
+7