From grep and SQL LIKE to a full-text search engine: the history of Apache Lucene, Elasticsearch's journey from 2010 to the Elastic Stack, the problems it solves, as well as comparisons with RDBMS, Apache Solr, and Algolia.

In episode 0 you made sure your environment was ready: JDK, Elasticsearch 8.x, Kibana, and the right debugging mindset. Now it's time to answer the most fundamental question: why does Elasticsearch even exist? Why isn't a relational database, established for decades, enough for search problems?
Episode 1 is a "storytelling" episode. We won't be typing much, but you'll understand the context that makes every Elasticsearch design decision sensible — and you'll carry that context all the way to episode 30. We'll cover the evolution of search technology, the problems Elasticsearch solves, its journey from 2010 to today, and its comparison with other solutions.
Before modern search engines, people searched for text in two ways. The first: grep on the command line — reading files one by one and matching patterns. The second: SQL queries with LIKE '%kata%' on databases. Both work, but both are linear — you have to scan all the data on every search.
SELECT * FROM posts
WHERE title LIKE '%elasticsearch%'LIKE has three problems. First, it's slow on large data because of the full table scan. Second, it's irrelevant — there's no way to rank results by how similar they are. Third, it's inflexible — it can't search for synonyms, root words, or handle typos. This is the gap full-text search engines try to fill.
Apache Lucene is a Java text search library first released in 2000 by Doug Cutting — the same person who later built Hadoop. Lucene introduced the inverted index: a data structure that maps every term to the list of documents containing it. This turns search from a linear scan into a direct lookup — extremely fast even across millions of documents.
The problem: Lucene is only a library, not a server. To use it, developers had to write Java code, manage index files manually, and there was no easy way to access it over the network. It took years, thousands of lines of code, and could only be used from within a single Java application.
| Year | Event |
|---|---|
| 2000 | Apache Lucene is first released as a search library |
| 2004 | Shay Banon starts building Compass, a search solution on top of Lucene |
| 2010 | Elasticsearch 0.4 is released as a distributed engine based on Lucene |
| 2013 | The company Elastic is founded by Shay Banon, Steven Schuurman, Uri Boness |
| 2015 | The ELK Stack (Elasticsearch, Logstash, Kibana) becomes the flagship product |
| 2016 | Beats is introduced; ELK is officially renamed to the Elastic Stack |
| 2018 | Elasticsearch becomes the most popular open source project on GitHub in the server category |
| 2020 | Elasticsearch 7.x discontinues the mapping type concept |
| 2022 | Elasticsearch 8.0: security enabled by default, TSDS, and a host of new features |
| 2024 | Elasticsearch 8.x keeps adding vector search, ELSER, and LLM integrations |
This journey matters because it explains two characteristics of Elasticsearch. First, it was born out of frustration — Shay Banon wanted to build a recipe search application, but Compass felt too complicated, so he wrote a simpler, easier-to-use engine. Second, it grew beyond search — from mere searching, it now covers observability, security analytics, and machine learning.
Relational databases excel at transactional consistency but are poor at free-text search. LIKE queries can't rank by relevance, don't understand word stemming, and are slow. Elasticsearch fills this role as a specialized search layer alongside the primary database — an architecture commonly called dual-write or outbox pattern.
Imagine a store catalog with millions of products. LIKE '%blend%' in SQL won't find "blended", "blending", or "blends" — while a search engine with stemming (episode 7) and relevance scoring (episode 6) can match and rank results by similarity. This is what makes Elasticsearch more than just "a database that searches faster".
Data keeps flowing in — server logs, user clicks, IoT events — and the questions asked aren't just "what matches", but "how many", "by what", "when". Elasticsearch combines search and aggregation in a single engine, so real-time dashboards and search can share the same data.
Speed is also part of the real-time promise: indexed documents can be searched almost instantly, fast enough to provide instant feedback in a search UI. The mechanisms that make this fast — Lucene segments and the refresh interval — you'll dissect further in episodes 7 and 19.
Relational databases are generally scaled by making a single machine bigger (scale up), and that has limits. Elasticsearch was designed distributed from the start: data is split into shards spread across many nodes. To add capacity, you simply add a new machine — without changing the application. This is called scaling out.
Of course, there's a price to pay. Distributed data means consistency, partitioning, and failover issues. Elasticsearch answers these with replication (data copies per shard), inter-node discovery, and automatic master election — concepts you'll master in episodes 2, 14, and 29.
Relational databases remain the king for transactions and structured data requiring ACID integrity. Elasticsearch excels at text search, relevance, and aggregation. It's not "one or the other", but "complementary" — most production architectures use both side by side.
Solr is also based on Lucene and became popular earlier (2004). Elasticsearch wins because it's simpler — cluster and sharding concepts that are easily accessible via a REST API without a separate ZooKeeper configuration. Good documentation and a large community make Elasticsearch the new default choice.
Algolia is a managed SaaS search — the choice if a team doesn't want to manage infrastructure. Elasticsearch gives full control, cheaper pricing at scale, and a complete ecosystem, but demands operational expertise. Choose Algolia for speed to launch; choose Elasticsearch for control and scale.
| Use Case | Example | Key Features |
|---|---|---|
| Application search | E-commerce product search, app search boxes | Full-text search, relevance, highlighting |
| Logging & observability | Centralizing logs from all servers with ELK | Ingest pipelines, aggregation, data streams |
| Security analytics | Anomaly detection in security logs | EQL, ML jobs, SIEM |
| Metrics & monitoring | Real-time metric dashboards | TSDB, date_histogram aggregation |
| Semantic search | Chatbots and embedding-based RAG | Vector search, ELSER |
| Geospatial | "Stores near my location" | Geo-point query, geo aggregation |
Tip
If there's one sentence to remember from this episode: Elasticsearch exists wherever search and analytics are needed at scale — and it was born because Lucene, although great, couldn't be a server. All of Elasticsearch's subsequent greatness is the result of making Lucene distributed and easy to access.
In episode 1 you understood the evolution of search: from linear grep and LIKE, to Apache Lucene which introduced the inverted index, to Elasticsearch which wraps Lucene into a distributed engine easily accessible via a REST API. You also saw the timeline from 2010 to today, the problems it solves — RDBMS limitations, real-time analytics, and horizontal scaling — as well as Elasticsearch's position compared to Solr, Algolia, and relational databases.
Key takeaways:
LIKE in SQL is linear and relevance-free; the inverted index makes search a fast lookup.Now it's time to move on to the technical foundation. In episode 2 we'll dissect the core concepts and main architecture: what an index, document, shard, and replica are, how the inverted index works behind the scenes, the role of each node type in a cluster, and how Elasticsearch runs the indexing and search processes from start to finish. This is the most important episode to understand before you type your first command — see you there!