|
5 | 5 | [glossary]
|
6 | 6 | [[glossary-analysis]] analysis ::
|
7 | 7 |
|
8 |
| - Analysis is the process of converting <<glossary-text,full text>> to |
9 |
| - <<glossary-term,terms>>. Depending on which analyzer is used, these phrases: |
10 |
| - `FOO BAR`, `Foo-Bar`, `foo,bar` will probably all result in the |
11 |
| - terms `foo` and `bar`. These terms are what is actually stored in |
12 |
| - the index. |
13 |
| - + |
14 |
| - A full text query (not a <<glossary-term,term>> query) for `FoO:bAR` will |
15 |
| - also be analyzed to the terms `foo`,`bar` and will thus match the |
16 |
| - terms stored in the index. |
17 |
| - + |
18 |
| - It is this process of analysis (both at index time and at search time) |
19 |
| - that allows Elasticsearch to perform full text queries. |
20 |
| - + |
21 |
| - Also see <<glossary-text,text>> and <<glossary-term,term>>. |
| 8 | +Analysis is the process of converting <<glossary-text,full text>> to |
| 9 | +<<glossary-term,terms>>. Depending on which analyzer is used, these phrases: |
| 10 | +`FOO BAR`, `Foo-Bar`, `foo,bar` will probably all result in the |
| 11 | +terms `foo` and `bar`. These terms are what is actually stored in |
| 12 | +the index. |
| 13 | ++ |
| 14 | +A full text query (not a <<glossary-term,term>> query) for `FoO:bAR` will |
| 15 | +also be analyzed to the terms `foo`,`bar` and will thus match the |
| 16 | +terms stored in the index. |
| 17 | ++ |
| 18 | +It is this process of analysis (both at index time and at search time) |
| 19 | +that allows Elasticsearch to perform full text queries. |
| 20 | ++ |
| 21 | +Also see <<glossary-text,text>> and <<glossary-term,term>>. |
22 | 22 |
|
23 | 23 | [[glossary-cluster]] cluster ::
|
24 | 24 |
|
25 |
| - A cluster consists of one or more <<glossary-node,nodes>> which share the |
26 |
| - same cluster name. Each cluster has a single master node which is |
27 |
| - chosen automatically by the cluster and which can be replaced if the |
28 |
| - current master node fails. |
29 |
| - |
| 25 | +A cluster consists of one or more <<glossary-node,nodes>> which share the |
| 26 | +same cluster name. Each cluster has a single master node which is |
| 27 | +chosen automatically by the cluster and which can be replaced if the |
| 28 | +current master node fails. |
| 29 | + |
30 | 30 | [[glossary-ccr]] {ccr} (CCR)::
|
31 | 31 |
|
32 |
| - The {ccr} feature enables you to replicate indices in remote clusters to your |
33 |
| - local cluster. For more information, see |
34 |
| - {stack-ov}/xpack-ccr.html[{ccr-cap}]. |
35 |
| - |
| 32 | +The {ccr} feature enables you to replicate indices in remote clusters to your |
| 33 | +local cluster. For more information, see |
| 34 | +{stack-ov}/xpack-ccr.html[{ccr-cap}]. |
| 35 | + |
36 | 36 | [[glossary-ccs]] {ccs} (CCS)::
|
37 | 37 |
|
38 |
| - The {ccs} feature enables any node to act as a federated client across |
39 |
| - multiple clusters. See <<modules-cross-cluster-search>>. |
| 38 | +The {ccs} feature enables any node to act as a federated client across |
| 39 | +multiple clusters. See <<modules-cross-cluster-search>>. |
40 | 40 |
|
41 | 41 | [[glossary-document]] document ::
|
42 | 42 |
|
43 |
| - A document is a JSON document which is stored in Elasticsearch. It is |
44 |
| - like a row in a table in a relational database. Each document is |
45 |
| - stored in an <<glossary-index,index>> and has a <<glossary-type,type>> and an |
46 |
| - <<glossary-id,id>>. |
47 |
| - + |
48 |
| - A document is a JSON object (also known in other languages as a hash / |
49 |
| - hashmap / associative array) which contains zero or more |
50 |
| - <<glossary-field,fields>>, or key-value pairs. |
51 |
| - + |
52 |
| - The original JSON document that is indexed will be stored in the |
53 |
| - <<glossary-source_field,`_source` field>>, which is returned by default when |
54 |
| - getting or searching for a document. |
| 43 | +A document is a JSON document which is stored in Elasticsearch. It is |
| 44 | +like a row in a table in a relational database. Each document is |
| 45 | +stored in an <<glossary-index,index>> and has a <<glossary-type,type>> and an |
| 46 | +<<glossary-id,id>>. |
| 47 | ++ |
| 48 | +A document is a JSON object (also known in other languages as a hash / |
| 49 | +hashmap / associative array) which contains zero or more |
| 50 | +<<glossary-field,fields>>, or key-value pairs. |
| 51 | ++ |
| 52 | +The original JSON document that is indexed will be stored in the |
| 53 | +<<glossary-source_field,`_source` field>>, which is returned by default when |
| 54 | +getting or searching for a document. |
55 | 55 |
|
56 | 56 | [[glossary-field]] field ::
|
57 | 57 |
|
58 |
| - A <<glossary-document,document>> contains a list of fields, or key-value |
59 |
| - pairs. The value can be a simple (scalar) value (eg a string, integer, |
60 |
| - date), or a nested structure like an array or an object. A field is |
61 |
| - similar to a column in a table in a relational database. |
62 |
| - + |
63 |
| - The <<glossary-mapping,mapping>> for each field has a field _type_ (not to |
64 |
| - be confused with document <<glossary-type,type>>) which indicates the type |
65 |
| - of data that can be stored in that field, eg `integer`, `string`, |
66 |
| - `object`. The mapping also allows you to define (amongst other things) |
67 |
| - how the value for a field should be analyzed. |
| 58 | +A <<glossary-document,document>> contains a list of fields, or key-value |
| 59 | +pairs. The value can be a simple (scalar) value (eg a string, integer, |
| 60 | +date), or a nested structure like an array or an object. A field is |
| 61 | +similar to a column in a table in a relational database. |
| 62 | ++ |
| 63 | +The <<glossary-mapping,mapping>> for each field has a field _type_ (not to |
| 64 | +be confused with document <<glossary-type,type>>) which indicates the type |
| 65 | +of data that can be stored in that field, eg `integer`, `string`, |
| 66 | +`object`. The mapping also allows you to define (amongst other things) |
| 67 | +how the value for a field should be analyzed. |
68 | 68 |
|
69 | 69 | [[glossary-filter]] filter ::
|
70 | 70 |
|
71 |
| - A filter is a non-scoring <<glossary-query,query>>, meaning that it does not score documents. |
72 |
| - It is only concerned about answering the question - "Does this document match?". |
73 |
| - The answer is always a simple, binary yes or no. This kind of query is said to be made |
74 |
| - in a <<query-filter-context,filter context>>, |
75 |
| - hence it is called a filter. Filters are simple checks for set inclusion or exclusion. |
76 |
| - In most cases, the goal of filtering is to reduce the number of documents that have to be examined. |
77 |
| - |
| 71 | +A filter is a non-scoring <<glossary-query,query>>, meaning that it does not score documents. |
| 72 | +It is only concerned about answering the question - "Does this document match?". |
| 73 | +The answer is always a simple, binary yes or no. This kind of query is said to be made |
| 74 | +in a <<query-filter-context,filter context>>, |
| 75 | +hence it is called a filter. Filters are simple checks for set inclusion or exclusion. |
| 76 | +In most cases, the goal of filtering is to reduce the number of documents that have to be examined. |
| 77 | + |
78 | 78 | [[glossary-follower-index]] follower index ::
|
79 |
| - |
80 |
| - Follower indices are the target indices for <<glossary-ccr,{ccr}>>. They exist |
81 |
| - in your local cluster and replicate <<glossary-leader-index,leader indices>>. |
82 |
| - |
| 79 | + |
| 80 | +Follower indices are the target indices for <<glossary-ccr,{ccr}>>. They exist |
| 81 | +in your local cluster and replicate <<glossary-leader-index,leader indices>>. |
| 82 | + |
83 | 83 | [[glossary-id]] id ::
|
84 | 84 |
|
85 |
| - The ID of a <<glossary-document,document>> identifies a document. The |
86 |
| - `index/id` of a document must be unique. If no ID is provided, |
87 |
| - then it will be auto-generated. (also see <<glossary-routing,routing>>) |
| 85 | +The ID of a <<glossary-document,document>> identifies a document. The |
| 86 | +`index/id` of a document must be unique. If no ID is provided, |
| 87 | +then it will be auto-generated. (also see <<glossary-routing,routing>>) |
88 | 88 |
|
89 | 89 | [[glossary-index]] index ::
|
90 | 90 |
|
91 |
| - An index is like a _table_ in a relational database. It has a |
92 |
| - <<glossary-mapping,mapping>> which contains a <<glossary-type,type>>, |
93 |
| - which contains the <<glossary-field,fields>> in the index. |
94 |
| - + |
95 |
| - An index is a logical namespace which maps to one or more |
96 |
| - <<glossary-primary-shard,primary shards>> and can have zero or more |
97 |
| - <<glossary-replica-shard,replica shards>>. |
98 |
| - |
| 91 | +An index is like a _table_ in a relational database. It has a |
| 92 | +<<glossary-mapping,mapping>> which contains a <<glossary-type,type>>, |
| 93 | +which contains the <<glossary-field,fields>> in the index. |
| 94 | ++ |
| 95 | +An index is a logical namespace which maps to one or more |
| 96 | +<<glossary-primary-shard,primary shards>> and can have zero or more |
| 97 | +<<glossary-replica-shard,replica shards>>. |
| 98 | + |
99 | 99 | [[glossary-leader-index]] leader index ::
|
100 |
| - |
101 |
| - Leader indices are the source indices for <<glossary-ccr,{ccr}>>. They exist |
102 |
| - on remote clusters and are replicated to |
103 |
| - <<glossary-follower-index,follower indices>>. |
| 100 | + |
| 101 | +Leader indices are the source indices for <<glossary-ccr,{ccr}>>. They exist |
| 102 | +on remote clusters and are replicated to |
| 103 | +<<glossary-follower-index,follower indices>>. |
104 | 104 |
|
105 | 105 | [[glossary-mapping]] mapping ::
|
106 | 106 |
|
107 |
| - A mapping is like a _schema definition_ in a relational database. Each |
108 |
| - <<glossary-index,index>> has a mapping, which defines a <<glossary-type,type>>, |
109 |
| - plus a number of index-wide settings. |
110 |
| - + |
111 |
| - A mapping can either be defined explicitly, or it will be generated |
112 |
| - automatically when a document is indexed. |
| 107 | +A mapping is like a _schema definition_ in a relational database. Each |
| 108 | +<<glossary-index,index>> has a mapping, which defines a <<glossary-type,type>>, |
| 109 | +plus a number of index-wide settings. |
| 110 | ++ |
| 111 | +A mapping can either be defined explicitly, or it will be generated |
| 112 | +automatically when a document is indexed. |
113 | 113 |
|
114 | 114 | [[glossary-node]] node ::
|
115 | 115 |
|
116 |
| - A node is a running instance of Elasticsearch which belongs to a |
117 |
| - <<glossary-cluster,cluster>>. Multiple nodes can be started on a single |
118 |
| - server for testing purposes, but usually you should have one node per |
119 |
| - server. |
120 |
| - + |
121 |
| - At startup, a node will use unicast to discover an existing cluster with |
122 |
| - the same cluster name and will try to join that cluster. |
123 |
| - |
124 |
| - [[glossary-primary-shard]] primary shard :: |
125 |
| - |
126 |
| - Each document is stored in a single primary <<glossary-shard,shard>>. When |
127 |
| - you index a document, it is indexed first on the primary shard, then |
128 |
| - on all <<glossary-replica-shard,replicas>> of the primary shard. |
129 |
| - + |
130 |
| - By default, an <<glossary-index,index>> has 5 primary shards. You can |
131 |
| - specify fewer or more primary shards to scale the number of |
132 |
| - <<glossary-document,documents>> that your index can handle. |
133 |
| - + |
134 |
| - You cannot change the number of primary shards in an index, once the |
135 |
| - index is created. |
136 |
| - + |
137 |
| - See also <<glossary-routing,routing>> |
| 116 | +A node is a running instance of Elasticsearch which belongs to a |
| 117 | +<<glossary-cluster,cluster>>. Multiple nodes can be started on a single |
| 118 | +server for testing purposes, but usually you should have one node per |
| 119 | +server. |
| 120 | ++ |
| 121 | +At startup, a node will use unicast to discover an existing cluster with |
| 122 | +the same cluster name and will try to join that cluster. |
| 123 | + |
| 124 | +[[glossary-primary-shard]] primary shard :: |
| 125 | + |
| 126 | +Each document is stored in a single primary <<glossary-shard,shard>>. When |
| 127 | +you index a document, it is indexed first on the primary shard, then |
| 128 | +on all <<glossary-replica-shard,replicas>> of the primary shard. |
| 129 | ++ |
| 130 | +By default, an <<glossary-index,index>> has 5 primary shards. You can |
| 131 | +specify fewer or more primary shards to scale the number of |
| 132 | +<<glossary-document,documents>> that your index can handle. |
| 133 | ++ |
| 134 | +You cannot change the number of primary shards in an index, once the |
| 135 | +index is created. |
| 136 | ++ |
| 137 | +See also <<glossary-routing,routing>> |
138 | 138 |
|
139 | 139 | [[glossary-query]] query ::
|
140 | 140 |
|
141 |
| - A query is the basic component of a search. A search can be defined by one or more queries |
142 |
| - which can be mixed and matched in endless combinations. While <<glossary-filter,filters>> are |
143 |
| - queries that only determine if a document matches, those queries that also calculate how well |
144 |
| - the document matches are known as "scoring queries". Those queries assign it a score, which is |
145 |
| - later used to sort matched documents. Scoring queries take more resources than <<glossary-filter,non scoring queries>> |
146 |
| - and their query results are not cacheable. As a general rule, use query clauses for full-text |
147 |
| - search or for any condition that requires scoring, and use filters for everything else. |
148 |
| - |
149 |
| - [[glossary-replica-shard]] replica shard :: |
150 |
| - |
151 |
| - Each <<glossary-primary-shard,primary shard>> can have zero or more |
152 |
| - replicas. A replica is a copy of the primary shard, and has two |
153 |
| - purposes: |
154 |
| - + |
155 |
| - 1. increase failover: a replica shard can be promoted to a primary |
156 |
| - shard if the primary fails |
157 |
| - 2. increase performance: get and search requests can be handled by |
158 |
| - primary or replica shards. |
159 |
| - + |
160 |
| - By default, each primary shard has one replica, but the number of |
161 |
| - replicas can be changed dynamically on an existing index. A replica |
162 |
| - shard will never be started on the same node as its primary shard. |
| 141 | +A query is the basic component of a search. A search can be defined by one or more queries |
| 142 | +which can be mixed and matched in endless combinations. While <<glossary-filter,filters>> are |
| 143 | +queries that only determine if a document matches, those queries that also calculate how well |
| 144 | +the document matches are known as "scoring queries". Those queries assign it a score, which is |
| 145 | +later used to sort matched documents. Scoring queries take more resources than <<glossary-filter,non scoring queries>> |
| 146 | +and their query results are not cacheable. As a general rule, use query clauses for full-text |
| 147 | +search or for any condition that requires scoring, and use filters for everything else. |
| 148 | + |
| 149 | +[[glossary-replica-shard]] replica shard :: |
| 150 | ++ |
| 151 | +-- |
| 152 | +Each <<glossary-primary-shard,primary shard>> can have zero or more |
| 153 | +replicas. A replica is a copy of the primary shard, and has two |
| 154 | +purposes: |
| 155 | + |
| 156 | +. increase failover: a replica shard can be promoted to a primary |
| 157 | +shard if the primary fails |
| 158 | +. increase performance: get and search requests can be handled by |
| 159 | +primary or replica shards. |
| 160 | + |
| 161 | +By default, each primary shard has one replica, but the number of |
| 162 | +replicas can be changed dynamically on an existing index. A replica |
| 163 | +shard will never be started on the same node as its primary shard. |
| 164 | +-- |
163 | 165 |
|
164 | 166 | [[glossary-routing]] routing ::
|
165 | 167 |
|
166 |
| - When you index a document, it is stored on a single |
167 |
| - <<glossary-primary-shard,primary shard>>. That shard is chosen by hashing |
168 |
| - the `routing` value. By default, the `routing` value is derived from |
169 |
| - the ID of the document or, if the document has a specified parent |
170 |
| - document, from the ID of the parent document (to ensure that child and |
171 |
| - parent documents are stored on the same shard). |
172 |
| - + |
173 |
| - This value can be overridden by specifying a `routing` value at index |
174 |
| - time, or a <<mapping-routing-field,routing |
175 |
| - field>> in the <<glossary-mapping,mapping>>. |
| 168 | +When you index a document, it is stored on a single |
| 169 | +<<glossary-primary-shard,primary shard>>. That shard is chosen by hashing |
| 170 | +the `routing` value. By default, the `routing` value is derived from |
| 171 | +the ID of the document or, if the document has a specified parent |
| 172 | +document, from the ID of the parent document (to ensure that child and |
| 173 | +parent documents are stored on the same shard). |
| 174 | ++ |
| 175 | +This value can be overridden by specifying a `routing` value at index |
| 176 | +time, or a <<mapping-routing-field,routing |
| 177 | +field>> in the <<glossary-mapping,mapping>>. |
176 | 178 |
|
177 | 179 | [[glossary-shard]] shard ::
|
178 | 180 |
|
179 |
| - A shard is a single Lucene instance. It is a low-level “worker” unit |
180 |
| - which is managed automatically by Elasticsearch. An index is a logical |
181 |
| - namespace which points to <<glossary-primary-shard,primary>> and |
182 |
| - <<glossary-replica-shard,replica>> shards. |
183 |
| - + |
184 |
| - Other than defining the number of primary and replica shards that an |
185 |
| - index should have, you never need to refer to shards directly. |
186 |
| - Instead, your code should deal only with an index. |
187 |
| - + |
188 |
| - Elasticsearch distributes shards amongst all <<glossary-node,nodes>> in the |
189 |
| - <<glossary-cluster,cluster>>, and can move shards automatically from one |
190 |
| - node to another in the case of node failure, or the addition of new |
191 |
| - nodes. |
192 |
| - |
193 |
| - [[glossary-source_field]] source field :: |
194 |
| - |
195 |
| - By default, the JSON document that you index will be stored in the |
196 |
| - `_source` field and will be returned by all get and search requests. |
197 |
| - This allows you access to the original object directly from search |
198 |
| - results, rather than requiring a second step to retrieve the object |
199 |
| - from an ID. |
| 181 | +A shard is a single Lucene instance. It is a low-level “worker” unit |
| 182 | +which is managed automatically by Elasticsearch. An index is a logical |
| 183 | +namespace which points to <<glossary-primary-shard,primary>> and |
| 184 | +<<glossary-replica-shard,replica>> shards. |
| 185 | ++ |
| 186 | +Other than defining the number of primary and replica shards that an |
| 187 | +index should have, you never need to refer to shards directly. |
| 188 | +Instead, your code should deal only with an index. |
| 189 | ++ |
| 190 | +Elasticsearch distributes shards amongst all <<glossary-node,nodes>> in the |
| 191 | +<<glossary-cluster,cluster>>, and can move shards automatically from one |
| 192 | +node to another in the case of node failure, or the addition of new |
| 193 | +nodes. |
| 194 | + |
| 195 | +[[glossary-source_field]] source field :: |
| 196 | + |
| 197 | +By default, the JSON document that you index will be stored in the |
| 198 | +`_source` field and will be returned by all get and search requests. |
| 199 | +This allows you access to the original object directly from search |
| 200 | +results, rather than requiring a second step to retrieve the object |
| 201 | +from an ID. |
200 | 202 |
|
201 | 203 | [[glossary-term]] term ::
|
202 | 204 |
|
203 |
| - A term is an exact value that is indexed in Elasticsearch. The terms |
204 |
| - `foo`, `Foo`, `FOO` are NOT equivalent. Terms (i.e. exact values) can |
205 |
| - be searched for using _term_ queries. |
206 |
| - + |
207 |
| - See also <<glossary-text,text>> and <<glossary-analysis,analysis>>. |
| 205 | +A term is an exact value that is indexed in Elasticsearch. The terms |
| 206 | +`foo`, `Foo`, `FOO` are NOT equivalent. Terms (i.e. exact values) can |
| 207 | +be searched for using _term_ queries. |
| 208 | ++ |
| 209 | +See also <<glossary-text,text>> and <<glossary-analysis,analysis>>. |
208 | 210 |
|
209 | 211 | [[glossary-text]] text ::
|
210 | 212 |
|
211 |
| - Text (or full text) is ordinary unstructured text, such as this |
212 |
| - paragraph. By default, text will be <<glossary-analysis,analyzed>> into |
213 |
| - <<glossary-term,terms>>, which is what is actually stored in the index. |
214 |
| - + |
215 |
| - Text <<glossary-field,fields>> need to be analyzed at index time in order to |
216 |
| - be searchable as full text, and keywords in full text queries must be |
217 |
| - analyzed at search time to produce (and search for) the same terms |
218 |
| - that were generated at index time. |
219 |
| - + |
220 |
| - See also <<glossary-term,term>> and <<glossary-analysis,analysis>>. |
| 213 | +Text (or full text) is ordinary unstructured text, such as this |
| 214 | +paragraph. By default, text will be <<glossary-analysis,analyzed>> into |
| 215 | +<<glossary-term,terms>>, which is what is actually stored in the index. |
| 216 | ++ |
| 217 | +Text <<glossary-field,fields>> need to be analyzed at index time in order to |
| 218 | +be searchable as full text, and keywords in full text queries must be |
| 219 | +analyzed at search time to produce (and search for) the same terms |
| 220 | +that were generated at index time. |
| 221 | ++ |
| 222 | +See also <<glossary-term,term>> and <<glossary-analysis,analysis>>. |
221 | 223 |
|
222 | 224 | [[glossary-type]] type ::
|
223 | 225 |
|
224 |
| - A type used to represent the _type_ of document, e.g. an `email`, a `user`, or a `tweet`. |
225 |
| - Types are deprecated and are in the process of being removed. See <<removal-of-types>>. |
226 |
| - |
| 226 | +A type used to represent the _type_ of document, e.g. an `email`, a `user`, or a `tweet`. |
| 227 | +Types are deprecated and are in the process of being removed. See <<removal-of-types>>. |
0 commit comments