Concepts · Concept

Elastic search

Instead, there are 3 different types of indexing strategies we’ll need in order to search of 3, very different types of filters:

Location: To efficiently search by location we need to use a geospatial index like geohashes, quadtrees, or R-trees.

Name: To efficiently search by name we need to use a full text search index which uses a technique called inverted indexes to quickly search for terms in a document.

Category: To efficiently search by category we can use a simple B-tree index.

There are several technologies which support all three of these indexing strategies (and more). One common example is Elasticsearch

How elastic search works:

The one-sentence version to say in an interview: “Elasticsearch resolves each filter to a postings list of matching doc IDs, intersects them using sorted-list merging, and its query planner automatically runs the most selective filter first to minimize work — so I don’t need to hand-order my query clauses for it to be efficient.”