Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 7ca64a1

Browse files
skalapurakkeldeploy user
authored and
deploy user
committed
Changes in ellen_troutman-at29536905925 branch
1 parent 3fda2f4 commit 7ca64a1

File tree

121 files changed

+251
-251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+251
-251
lines changed

010_Intro/10_Installing_ES.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ https://github.com/elasticsearch/cookbook-elasticsearch[Chef cookbook].
3434

3535
http://www.elasticsearch.com/products/marvel[Marvel] is a management((("Marvel", "defined"))) and monitoring
3636
tool for Elasticsearch, which is free for development use. It comes with an
37-
interactive console called Sense, which makes it easy to talk to
37+
interactive console called Sense,((("Sense console (Marvel plugin)"))) which makes it easy to talk to
3838
Elasticsearch directly from your browser.
3939

4040
Many of the code examples in the online version of this book include a View in Sense link. When
@@ -124,6 +124,6 @@ If you installed the <<marvel,Marvel>> management ((("Marvel", "viewing")))and m
124124
view it in a web browser by visiting
125125
http://localhost:9200/_plugin/marvel/.
126126

127-
You can reach the _Sense_ developer((("Sense", "viewing developer console"))) console either by clicking the ``Marvel
127+
You can reach the _Sense_ developer((("Sense console (Marvel plugin)", "viewing"))) console either by clicking the ``Marvel
128128
dashboards'' drop-down in Marvel, or by visiting
129129
http://localhost:9200/_plugin/marvel/sense/.

010_Intro/15_API.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ of the http://www.elasticsearch.org/guide/[Guide].
3535
==== RESTful API with JSON over HTTP
3636

3737
All other languages can communicate with Elasticsearch((("port 9200 for non-Java clients"))) over port _9200_ using
38-
a ((("RESTful API", "communicating with Elasticseach")))RESTful API, accessible with your favorite web client. In fact, as you have
38+
a ((("RESTful API, communicating with Elasticseach")))RESTful API, accessible with your favorite web client. In fact, as you have
3939
seen, you can even talk to Elasticsearch from the command line by using the
4040
`curl` command.((("curl command", "talking to Elasticsearch with")))
4141

@@ -128,6 +128,6 @@ GET /_count
128128
--------------------------------------------------
129129
// SENSE: 010_Intro/15_Count.json
130130

131-
In fact, this is the same format that is used by the ((("Sense", "curl requests in")))Sense console that we
131+
In fact, this is the same format that is used by the ((("Marvel", "Sense console")))((("Sense console (Marvel plugin)", "curl requests in")))Sense console that we
132132
installed with <<marvel,Marvel>>. If in the online version of this book, you can open and run this code example in
133133
Sense by clicking the View in Sense link above.

010_Intro/25_Tutorial_Indexing.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ employee. The act of storing data in Elasticsearch is called _indexing_, but
3535
before we can index a document, we need to decide _where_ to store it.
3636

3737
In Elasticsearch, a document belongs to a _type_, and those((("types"))) types live inside
38-
an _index_. You can draw some (rough) parallels to a traditional relational database:
38+
an _index_. ((("indices")))You can draw some (rough) parallels to a traditional relational database:
3939

4040
----
4141
Relational DB ⇒ Databases ⇒ Tables ⇒ Rows ⇒ Columns
@@ -68,9 +68,9 @@ replace the old.
6868
6969
Inverted index::
7070
71-
Relational databases add an _index_, such as a B-tree index,((("relational databases", "indexes"))) to specific
71+
Relational databases add an _index_, such as a B-tree index,((("relational databases", "indices"))) to specific
7272
columns in order to improve the speed of data retrieval. Elasticsearch and
73-
Lucene use a structure called((("inverted indexes"))) an _inverted index_ for exactly the same
73+
Lucene use a structure called((("inverted index"))) an _inverted index_ for exactly the same
7474
purpose.
7575
+
7676
By default, every field in a document is _indexed_ (has an inverted index)

010_Intro/30_Tutorial_Search.asciidoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ business requirements for this application. The first requirement is the
55
ability to retrieve individual employee data.
66

77
This is easy in Elasticsearch. We simply execute((("HTTP requests", "retrieving a document with GET"))) an HTTP +GET+ request and
8-
specify the _address_ of the document--the index, type, and ID.((("id", "speccifying in a request")))((("indexes", "specifying index in a request")))((("types", "specifying type in a request"))) Using
8+
specify the _address_ of the document--the index, type, and ID.((("id", "specifying in a request")))((("indices", "specifying index in a request")))((("types", "specifying type in a request"))) Using
99
those three pieces of information, we can return the original JSON document:
1010

1111
[source,js]
@@ -15,7 +15,7 @@ GET /megacorp/employee/1
1515
// SENSE: 010_Intro/30_Get.json
1616

1717
And the response contains some metadata about the document, and John Smith's
18-
original JSON document ((("source field")))as the `_source` field:
18+
original JSON document ((("_source field", sortas="source field")))as the `_source` field:
1919

2020
[source,js]
2121
--------------------------------------------------
@@ -260,7 +260,7 @@ range search, and reused the same `match` query as before. Now our results show
260260
=== Full-Text Search
261261

262262
The searches so far have been simple: single names, filtered by age. Let's
263-
try a more advanced, full-text search--a ((("full-text search")))task that traditional databases
263+
try a more advanced, full-text search--a ((("full text search")))task that traditional databases
264264
would really struggle with.
265265

266266
We are going to search for all employees who enjoy rock climbing:
@@ -334,7 +334,7 @@ traditional relational databases, in which a record either matches or it doesn't
334334
=== Phrase Search
335335

336336
Finding individual words in a field is all well and good, but sometimes you
337-
want to match exact sequences of words or _phrases_.((("prhase search"))) For instance, we could
337+
want to match exact sequences of words or _phrases_.((("phrase matching"))) For instance, we could
338338
perform a query that will match only employee records that contain both ``rock''
339339
_and_ ``climbing'' _and_ that display the words are next to each other in the phrase
340340
``rock climbing.''

020_Distributed_Cluster/00_Intro.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ to skim through the chapter and to refer to it again later.
1717
1818
****
1919

20-
Elasticsearch is built to be ((("scalability", "Elasticsearch and")))always available, and to scale with your needs.
20+
Elasticsearch is built to be ((("scalability, Elasticsearch and")))always available, and to scale with your needs.
2121
Scale can come from buying bigger ((("vertical scaling, Elasticsearch and")))servers (_vertical scale_, or _scaling up_)
2222
or from buying more ((("horizontal scaling, Elasticsearch and")))servers (_horizontal scale_, or _scaling out_).
2323

020_Distributed_Cluster/15_Add_an_index.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== Add an Index
22

33
To add data to Elasticsearch, we need an _index_&#x2014;a place to store related
4-
data.((("indexes")))((("clusters", "adding an index"))) In reality, an index is just a _logical namespace_ that points to
4+
data.((("indices")))((("clusters", "adding an index"))) In reality, an index is just a _logical namespace_ that points to
55
one or more physical _shards_.
66

77
A _shard_ is a low-level _worker unit_ that holds((("shards", "defined"))) just a slice of all the
@@ -37,8 +37,8 @@ serve read requests like searching or retrieving a document.
3737
The number of primary shards in an index is fixed at the time that an index is
3838
created, but the number of replica shards can be changed at any time.
3939

40-
Let's create an index called `blogs` in our empty one-node cluster.((("indexes", "creating"))) By
41-
default, indices are assigned five primary shards,((("primary shards", "assigned to indexes")))((("replica shards", "assigned to indexes"))) but for the purpose of this
40+
Let's create an index called `blogs` in our empty one-node cluster.((("indices", "creating"))) By
41+
default, indices are assigned five primary shards,((("primary shards", "assigned to indices")))((("replica shards", "assigned to indices"))) but for the purpose of this
4242
demonstration, we'll assign just three primary shards and one replica (one replica
4343
of every primary shard):
4444

020_Distributed_Cluster/20_Add_failover.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== Add Failover
22

33
Running a single node means that you have a single point of failure--there
4-
is no redundancy.((("failover", "adding"))) Fortunately, all we need to do to protect ourselves from data
4+
is no redundancy.((("failover, adding"))) Fortunately, all we need to do to protect ourselves from data
55
loss is to start another node.
66

77
.Starting a Second Node

020_Distributed_Cluster/25_Scale_horizontally.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== Scale Horizontally
22

3-
What about scaling as the demand for our application grows?((("scaling horizontally")))((("clusters", "three-node cluster")))((("primary shards", "in three-node cluster"))) If we start a
3+
What about scaling as the demand for our application grows?((("scaling", "horizontally")))((("clusters", "three-node cluster")))((("primary shards", "in three-node cluster"))) If we start a
44
third node, our cluster reorganizes itself to look like
55
<<cluster-three-nodes>>.
66

020_Distributed_Cluster/30_Scale_more.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
But what if we want to scale our search to more than six nodes?
44

5-
The number of primary shards is fixed at the moment an((("indexes", "fixed number of primary shards")))((("primary shards", "fixed number in an index"))) index is created.
5+
The number of primary shards is fixed at the moment an((("indices", "fixed number of primary shards")))((("primary shards", "fixed number in an index"))) index is created.
66
Effectively, that number defines the maximum amount of data that can be
77
_stored_ in the index. (The actual number depends on your data, your hardware
88
and your use case.) However, read requests--searches or document retrieval--can be handled by a primary _or_ a replica shard, so the more copies of
99
data that you have, the more search throughput you can handle.
1010

11-
The number of replica shards can be changed dynamically on a live cluster,
11+
The number of ((("scaling", "increasing number of replica shards")))replica shards can be changed dynamically on a live cluster,
1212
allowing us to scale up or down as demand requires. Let's increase the number
1313
of replicas from the default of `1` to `2`:
1414

020_Distributed_Cluster/35_Coping_with_failure.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== Coping with Failure
22

33
We've said that Elasticsearch can cope when nodes fail, so let's go
4-
ahead and try it out. ((("shards", "horizontal scaling and safety of data")))((("failure", "coping with")))((("master node", "killing and replacing")))((("nodes", "failure of")))((("clusters", "coping with failure of nodes")))If we kill the first node, our cluster looks like
4+
ahead and try it out. ((("shards", "horizontal scaling and safety of data")))((("failure of nodes, coping with")))((("master node", "killing and replacing")))((("nodes", "failure of")))((("clusters", "coping with failure of nodes")))If we kill the first node, our cluster looks like
55
<<cluster-post-kill>>.
66

77
[[cluster-post-kill]]

030_Data/00_Intro.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ objects as documents, they still require us to think about how we want to
4343
query our data, and which fields require an index in order to make data
4444
retrieval fast.
4545

46-
In Elasticsearch, _all data in every field_ is _indexed by default_. That is,
46+
In Elasticsearch, _all data in every field_ is _indexed by default_.((("indexing", "in Elasticsearch"))) That is,
4747
every field has a dedicated inverted index for fast retrieval. And, unlike
4848
most other databases, it can use all of those inverted indices _in the same
4949
query_, to return results at breathtaking speed.

030_Data/05_Document.asciidoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ elements are as follows:
5858
==== _index
5959

6060
An _index_ is like a database in a relational database; it's the place
61-
we store and index related data.((("indexes")))
61+
we store and index related data.((("indices", "_index, in document metadata")))
6262

6363
[TIP]
6464
====
6565
Actually, in Elasticsearch, our data is stored and indexed in _shards_,
6666
while an index is just a logical namespace that groups together one or more
67-
shards.((("shards", "grouped in indexes"))) However, this is an internal detail; our application shouldn't care
67+
shards.((("shards", "grouped in indices"))) However, this is an internal detail; our application shouldn't care
6868
about shards at all. As far as our application is concerned, our documents
6969
live in an _index_. Elasticsearch takes care of the details.
7070
====
@@ -83,7 +83,7 @@ may have a name, a gender, an age, and an email address.
8383

8484
In a relational database, we usually store objects of the same class in the
8585
same table, because they share the same data structure. For the same reason, in
86-
Elasticsearch we use the same _type_ for ((("types")))documents that represent the same
86+
Elasticsearch we use the same _type_ for ((("types", "_type, in document metadata)))documents that represent the same
8787
class of _thing_, because they share the same data structure.
8888

8989
Every _type_ has its own <<mapping,mapping>> or schema ((("mapping (types)")))((("schema definition, types")))definition, which
@@ -101,7 +101,7 @@ underscore or contain commas.((("types", "names of"))) We will use `blog` for o
101101

102102
==== _id
103103

104-
The _ID_ is a string that,((("id", "in document metadata"))) when combined with the `_index` and `_type`,
104+
The _ID_ is a string that,((("id", "_id, in document metadata"))) when combined with the `_index` and `_type`,
105105
uniquely identifies a document in Elasticsearch. When creating a new document,
106106
you can either provide your own `_id` or let Elasticsearch generate one for
107107
you.

030_Data/10_Index.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[index-doc]]
22
=== Indexing a Document
33

4-
Documents are _indexed_&#x2014;stored and made ((("documents", "indexing")))((("indexes", "indexing a document")))searchable--by using the `index`
4+
Documents are _indexed_&#x2014;stored and made ((("documents", "indexing")))((("indexing", "a document")))searchable--by using the `index`
55
API. But first, we need to decide where the document lives. As we just
66
discussed, a document's `_index`, `_type`, and `_id` uniquely identify the
77
document. We can either provide our own `_id` value or let the `index` API
@@ -65,7 +65,7 @@ made by another part.
6565
==== Autogenerating IDs
6666

6767
If our data doesn't have a natural ID, we can let Elasticsearch autogenerate
68-
one for us. ((("id", "autogenerating")))The structure of the request changes: instead of using ((("HTP methods", "POST")))the `PUT`
68+
one for us. ((("id", "autogenerating")))The structure of the request changes: instead of using ((("HTTP methods", "POST")))((("POST method")))the `PUT`
6969
verb (``store this document at this URL''), we use the `POST` verb (``store this document _under_ this URL'').
7070

7171
The URL now contains just the `_index` and the `_type`:

030_Data/15_Get.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GET /website/blog/123?pretty
1111

1212
// SENSE: 030_Data/15_Get_document.json
1313

14-
The response includes the by-now-familiar metadata elements, plus ((("source field")))the `_source`
14+
The response includes the by-now-familiar metadata elements, plus ((("_source field", sortas="source field")))the `_source`
1515
field, which contains the original JSON document that we sent to Elasticsearch
1616
when we indexed it:
1717

@@ -40,7 +40,7 @@ Instead we get back exactly the same JSON string that we passed in.
4040
====
4141

4242
The response to the +GET+ request includes `{"found": true}`. This confirms that
43-
the document was found. ((("documents", "requesting non-existant document")))If we were to request a document that doesn't exist,
43+
the document was found. ((("documents", "requesting non-existent document")))If we were to request a document that doesn't exist,
4444
we would still get a JSON response, but `found` would be set to `false`.
4545

4646
Also, the HTTP response code would be `404 Not Found` instead of `200 OK`.

030_Data/20_Exists.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[[doc-exists]]
22
=== Checking Whether a Document Exists
33

4-
If all you want to do is to check whether a document exists--you're not
5-
interested in the content at all--then use the `HEAD` method instead
4+
If all you want to do is to check whether a ((("documents", "checking whether a document exists")))document exists--you're not
5+
interested in the content at all--then use((("HEAD method")))((("HTTP methods", "HEAD"))) the `HEAD` method instead
66
of the `GET` method. `HEAD` requests don't return a body, just HTTP headers:
77

88
[source,js]

030_Data/25_Update.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=== Updating a Whole Document
33

44
Documents in Elasticsearch are _immutable_; we cannot change them.((("documents", "updating whole document")))((("updating documents", "whole document"))) Instead, if
5-
we need to update an existing document, we _reindex_ or replace it, which we
5+
we need to update an existing document, we _reindex_ or replace it,((("reindexing")))((("indexing", seealso="reindexing"))) which we
66
can do using the same `index` API that we have already discussed in
77
<<index-doc>>.
88

030_Data/30_Create.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ new document and not overwriting an existing one?
77
Remember that the combination of `_index`, `_type`, and `_id` uniquely
88
identifies a document. So the easiest way to ensure that our document is new
99
is by letting Elasticsearch autogenerate a new unique `_id`, using the `POST`
10-
version of ((("HTTP methods", "POST")))the index request:
10+
version of ((("POST method")))((("HTTP methods", "POST")))the index request:
1111

1212
[source,js]
1313
--------------------------------------------------
@@ -21,7 +21,7 @@ the same `_index`, `_type`, and `_id` doesn't exist already. There are two ways
2121
of doing this, both of which amount to the same thing. Use whichever method is
2222
more convenient for you.
2323

24-
The first method uses the `op_type` query((("query strings", "op_type parameter")))((("op_type query string parameter")))-string parameter:
24+
The first method uses the `op_type` query((("PUT method")))((("HTTP methods", "PUT")))((("query strings", "op_type parameter")))((("op_type query string parameter")))-string parameter:
2525

2626
[source,js]
2727
--------------------------------------------------

030_Data/35_Delete.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=== Deleting a Document
33

44
The syntax for deleting a document((("documents", "deleting"))) follows the same pattern that we have seen
5-
already, but ((("deleting documents")))((("HTTP methods", "DELETE")))uses the `DELETE` method :
5+
already, but ((("DELETE method", "deleting documents")))((("HTTP methods", "DELETE")))uses the `DELETE` method :
66

77
[source,js]
88
--------------------------------------------------

030_Data/55_Bulk.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The `bulk` request body has the following, slightly unusual, format:
1919
--------------------------------------------------
2020

2121
This format is like a _stream_ of valid one-line JSON documents joined
22-
together by newline (`\n`) characters.((("\n (newline) characters in buk requests", sortas="n (newline)"))) Two important points to note:
22+
together by newline (`\n`) characters.((("\n (newline) characters in bulk requests", sortas="n (newline)"))) Two important points to note:
2323

2424
* Every line must end with a newline character (`\n`), _including the last
2525
line_. These are used as markers to allow for efficient line separation.
@@ -194,7 +194,7 @@ succeeded:
194194
<3> The error message explaining why the request failed.
195195
<4> The second request succeeded with an HTTP status code of `200 OK`.
196196

197-
That also means ((("bulk API", "bulk requests, not atomic")))that `bulk` requests are not atomic: they cannot be used to
197+
That also means ((("bulk API", "bulk requests, not transactions")))that `bulk` requests are not atomic: they cannot be used to
198198
implement transactions. Each request is processed separately, so the success
199199
or failure of one request will not interfere with the others.
200200

040_Distributed_CRUD/05_Routing.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[routing-value]]
22
=== Routing a Document to a Shard
33

4-
When you index a document, it is stored on a single primary shard.((("shards", "routing a document to")))((("routing a document to a shard"))) How does
4+
When you index a document, it is stored on a single primary shard.((("shards", "routing a document to")))((("documents", "routing a document to a shard")))((("routing a document to a shard"))) How does
55
Elasticsearch know which shard a document belongs to? When we create a new
66
document, how does it know whether it should store that document on shard 1 or
77
shard 2?

0 commit comments

Comments
 (0)