Skip to content

Commit 430d826

Browse files
author
JessicaWon
committed
modified: 00_Intro.asciidoc
1 parent 76eee1a commit 430d826

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

060_Distributed_Search/00_Intro.asciidoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
[[distributed-search]]
2+
== Distributed Search Execution
3+
4+
Before moving on, we are going to take a detour and talk about how search is
5+
executed in a distributed environment.((("distributed search execution"))) It is a bit more complicated than the
6+
basic _create-read-update-delete_ (CRUD) requests((("CRUD (create-read-update-delete) operations"))) that we discussed in
7+
<<distributed-docs>>.
8+
9+
.Content Warning
10+
****
11+
12+
The information presented in this chapter is for your interest. You are not required to
13+
understand and remember all the detail in order to use Elasticsearch.
14+
15+
Read this chapter to gain a taste for how things work, and to know where the
16+
information is in case you need to refer to it in the future, but don't be
17+
overwhelmed by the detail.
18+
19+
****
20+
21+
A CRUD operation deals with a single document that has a unique combination of
22+
`_index`, `_type`, and <<routing-value,`routing` values>> (which defaults to the
23+
document's `_id`). This means that we know exactly which shard in the cluster
24+
holds that document.
25+
26+
Search requires a more complicated execution model because we don't know which
27+
documents will match the query: they could be on any shard in the cluster. A
28+
search request has to consult a copy of every shard in the index or indices
29+
we're interested in to see if they have any matching documents.
30+
31+
But finding all matching documents is only half the story. Results from
32+
multiple shards must be combined into a single sorted list before the `search`
33+
API can return a ``page'' of results. For this reason, search is executed in a
34+
two-phase process called _query then fetch_.
35+
136
[[distributed-search]]
237
== 分布式检索执行
338

0 commit comments

Comments
 (0)