Modern search seems like magic—you type a few words and the search engine appears to know what you want. With the Elasticsearch real-time search and analytics engine, you can give your users this magical experience without having to do complex low-level programming or understand advanced data science algorithms. You just install it, tweak it, and get on with your work. Elasticsearch in Action teaches you how to write applications that deliver professional quality search. As you read, you'll learn to add basic search features to any application, enhance search results with predictive analysis and relevancy ranking, and use saved data from prior searches to give users a custom experience. This practical book focuses on Elasticsearch's REST API via HTTP. Code snippets are written mostly in bash using cURL, so they're easily translatable to other languages.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A hands-on guide to building professional-quality search into your applications with Elasticsearch, using its REST API and cURL examples that translate to any language. Best for developers who want working search features—indexing, querying, relevance tuning, and suggestions—without wrestling low-level Lucene internals.
【Book Arc】
- **Opening (~0%–10%)**: Introduces Elasticsearch as a distributed, Lucene-based search engine, its typical use cases (full-text search plus real-time analytics), and how to install and reach it via the REST API on port 9200.
- **Early (~10%–32%)**: Covers the logical and physical layout—documents, types, indices, nodes, and primary/replica shards—then walks through indexing your first document, auto-creating indices and mappings, and retrieving data.
- **Early–Middle (~32%–48%)**: Moves into mappings and core field types (string, numeric, date, boolean), arrays and multi-fields, predefined fields, updating documents, and optimistic concurrency control through versioning.
- **Middle (~39%–48%)**: Explains the anatomy of a search request—query, size, from, _source, and sort—and the crucial query-versus-filter distinction, including the filtered query and cacheable bitsets.
- **Middle (~48%+)**: Dives into query types such as match (boolean and phrase behavior with slop) and range, with guidance to prefer filters for performance.
- **Late (beyond excerpts)**: The excerpts do not cover the later chapters on analysis, performance, and administration in detail; the table of contents hints at these but the sampled material stops around query construction.
【Key Takeaways】
- **Elasticsearch is document-oriented and schema-free by default** (Early): You can index a document without pre-creating the index or mapping—Elasticsearch auto-generates both, letting you start fast and refine later.
- **The logical/physical split matters** (Early): Documents live in types within indices (logical), while nodes and primary/replica shards handle storage and distribution (physical); understanding this explains how indexing and searching scale.
- **Queries score, filters don't** (Middle): Queries return relevance scores; filters only ask whether a document matches, making them faster and cacheable. The book's rule of thumb: if unsure, make it a filter.
- **Mappings control searchability** (Early–Middle): The `index` option (`analyzed`, `not_analyzed`, `no`) determines whether and how a field is searchable—critical for matching user expectations.
- **Versioning enables optimistic concurrency** (Early–Middle): Each update increments a version; conflicting parallel updates fail, and `retry_on_conflict` can reapply automatically.
- **Search requests have tunable components** (Middle): `size`, `from`, `_source`, and `sort` shape results; deep pagination is expensive because Elasticsearch must compute all preceding top hits.
- **Match queries are flexible** (Middle): Default boolean/OR behavior can be switched to AND, or to phrase behavior with slop for positional matching.
- **REST API via cURL is the teaching vehicle** (throughout): Examples are language-agnostic, so you can port them to your stack.
【Reading Tips】
- Deep-read the early chapters on documents, types, indices, and shards—these mental models underpin everything later.
- Skim the installation and configuration material if you already have a running cluster; return to it when tuning cluster name or JVM settings.
- Pay close attention to the query-versus-filter distinction and the filtered query pattern; it recurs and affects performance.
- Treat the cURL snippets as templates: run them, then translate to your language's HTTP client.
- Don't skip the versioning/concurrency section if your application performs concurrent updates.
【Coverage Limits】
This guide is based on stratified excerpts covering roughly the first half of the book; later chapters on analysis, performance tuning, and administration are only hinted at and not summarized here.
Page 9
48 Starting a second node 50 ■ Adding additional nodes 51 2.7 Summary 52 3 Indexing, updating, and deleting data 53 3.1 Using mappings to define kinds of doc...
hards, regardless of their status as primaries or replicas. located on a different node, like it is on Node 2 in figure 2.4, but this is transparent to the a...
Elasticsearch to generate unique IDs for you. This is use- ful if you don’t already have a unique ID or you don’t need to identify documents by a certain pro...
this filter. Figure 4.3 shows what this bitset looks like. After constructing the bitset, Elasticsearch can now use it to filter (hence the name!) out the do...
ail.com> 136 CHAPTER 5 Analyzing your data } } } } Now you have the index with the configured custom filter called my-length-filter. In the next request you...
h a phrase query with a high slop value can be expensive to run, you don’t have to worry, because the query will run on only the top 20 documents instead of...
de_in_parent": true, also indexed as objects for the "properties": { parent members documents. "date": { "type": "date", "format": "dateOptionalTime" "commen...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Elasticsearch in Action (Radu Gheorghe, Matthew Lee Hinman, Roy Russo) (Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Elasticsearch in Action (Radu Gheorghe, Matthew Lee Hinman, Roy Russo) (Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment