glossary.asciidoc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. [glossary]
  2. [[glossary]]
  3. = Glossary of terms
  4. [glossary]
  5. [[glossary-analysis]] analysis ::
  6. +
  7. --
  8. // tag::analysis-def[]
  9. Analysis is the process of converting <<glossary-text,full text>> to
  10. <<glossary-term,terms>>. Depending on which analyzer is used, these phrases:
  11. `FOO BAR`, `Foo-Bar`, `foo,bar` will probably all result in the
  12. terms `foo` and `bar`. These terms are what is actually stored in
  13. the index.
  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. It is this process of analysis (both at index time and at search time)
  18. that allows Elasticsearch to perform full text queries.
  19. Also see <<glossary-text,text>> and <<glossary-term,term>>.
  20. // end::analysis-def[]
  21. --
  22. [[glossary-cluster]] cluster ::
  23. // tag::cluster-def[]
  24. A cluster consists of one or more <<glossary-node,nodes>> which share the
  25. same cluster name. Each cluster has a single master node which is
  26. chosen automatically by the cluster and which can be replaced if the
  27. current master node fails.
  28. // end::cluster-def[]
  29. [[glossary-ccr]] {ccr} (CCR)::
  30. // tag::ccr-def[]
  31. The {ccr} feature enables you to replicate indices in remote clusters to your
  32. local cluster. For more information, see
  33. {ref}/xpack-ccr.html[{ccr-cap}].
  34. // end::ccr-def[]
  35. [[glossary-ccs]] {ccs} (CCS)::
  36. // tag::ccs-def[]
  37. The {ccs} feature enables any node to act as a federated client across
  38. multiple clusters.
  39. See {ref}/modules-cross-cluster-search.html[Search across clusters].
  40. // end::ccs-def[]
  41. [[glossary-document]] document ::
  42. +
  43. --
  44. // tag::document-def[]
  45. A document is a JSON document which is stored in Elasticsearch. It is
  46. like a row in a table in a relational database. Each document is
  47. stored in an <<glossary-index,index>> and has a <<glossary-type,type>>
  48. and an <<glossary-id,id>>.
  49. A document is a JSON object (also known in other languages as a hash /
  50. hashmap / associative array) which contains zero or more
  51. <<glossary-field,fields>>, or key-value pairs.
  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. // end::document-def[]
  56. --
  57. [[glossary-field]] field ::
  58. +
  59. --
  60. // tag::field-def[]
  61. A <<glossary-document,document>> contains a list of fields, or key-value
  62. pairs. The value can be a simple (scalar) value (eg a string, integer,
  63. date), or a nested structure like an array or an object. A field is
  64. similar to a column in a table in a relational database.
  65. The <<glossary-mapping,mapping>> for each field has a field _type_ (not to
  66. be confused with document <<glossary-type,type>>) which indicates the type
  67. of data that can be stored in that field, eg `integer`, `string`,
  68. `object`. The mapping also allows you to define (amongst other things)
  69. how the value for a field should be analyzed.
  70. // end::field-def[]
  71. --
  72. [[glossary-filter]] filter ::
  73. // tag::filter-def[]
  74. A filter is a non-scoring <<glossary-query,query>>,
  75. meaning that it does not score documents.
  76. It is only concerned about answering the question - "Does this document match?".
  77. The answer is always a simple, binary yes or no. This kind of query is said to be made
  78. in a {ref}/query-filter-context.html[filter context],
  79. hence it is called a filter. Filters are simple checks for set inclusion or exclusion.
  80. In most cases, the goal of filtering is to reduce the number of documents that have to be examined.
  81. // end::filter-def[]
  82. [[glossary-follower-index]] follower index ::
  83. // tag::follower-index-def[]
  84. Follower indices are the target indices for <<glossary-ccr,{ccr}>>. They exist
  85. in your local cluster and replicate <<glossary-leader-index,leader indices>>.
  86. // end::follower-index-def[]
  87. [[glossary-id]] id ::
  88. // tag::id-def[]
  89. The ID of a <<glossary-document,document>> identifies a document. The
  90. `index/id` of a document must be unique. If no ID is provided,
  91. then it will be auto-generated. (also see <<glossary-routing,routing>>)
  92. // end::id-def[]
  93. [[glossary-index]] index ::
  94. +
  95. --
  96. // tag::index-def[]
  97. An index is like a _table_ in a relational database. It has a
  98. <<glossary-mapping,mapping>> which contains a <<glossary-type,type>>,
  99. which contains the <<glossary-field,field>> in the index.
  100. An index is a logical namespace which maps to one or more
  101. <<glossary-primary-shard,primary shards>> and can have zero or more
  102. <<glossary-replica-shard,replica shards>>.
  103. // end::index-def[]
  104. --
  105. [[glossary-index-alias]] index alias ::
  106. +
  107. --
  108. // tag::index-alias-def[]
  109. // tag::index-alias-desc[]
  110. An index alias is a secondary name
  111. used to refer to one or more existing indices.
  112. Most {es} APIs accept an index alias
  113. in place of an index name.
  114. // end::index-alias-desc[]
  115. See {ref}/indices-add-alias.html[Add index alias].
  116. // end::index-alias-def[]
  117. --
  118. [[glossary-leader-index]] leader index ::
  119. // tag::leader-index-def[]
  120. Leader indices are the source indices for <<glossary-ccr,{ccr}>>. They exist
  121. on remote clusters and are replicated to
  122. <<glossary-follower-index,follower indices>>.
  123. // end::leader-index-def[]
  124. [[glossary-mapping]] mapping ::
  125. +
  126. --
  127. // tag::mapping-def[]
  128. A mapping is like a _schema definition_ in a relational database. Each
  129. <<glossary-index,index>> has a mapping,
  130. which defines a <<glossary-type,type>>,
  131. plus a number of index-wide settings.
  132. A mapping can either be defined explicitly, or it will be generated
  133. automatically when a document is indexed.
  134. // end::mapping-def[]
  135. --
  136. [[glossary-node]] node ::
  137. +
  138. --
  139. // tag::node-def[]
  140. A node is a running instance of Elasticsearch which belongs to a
  141. <<glossary-cluster,cluster>>. Multiple nodes can be started on a single
  142. server for testing purposes, but usually you should have one node per
  143. server.
  144. At startup, a node will use unicast to discover an existing cluster with
  145. the same cluster name and will try to join that cluster.
  146. // end::node-def[]
  147. --
  148. [[glossary-primary-shard]] primary shard ::
  149. +
  150. --
  151. // tag::primary-shard-def[]
  152. Each document is stored in a single primary <<glossary-shard,shard>>. When
  153. you index a document, it is indexed first on the primary shard, then
  154. on all <<glossary-replica-shard,replicas>> of the primary shard.
  155. By default, an <<glossary-index,index>> has one primary shard. You can specify
  156. more primary shards to scale the number of <<glossary-document,documents>>
  157. that your index can handle.
  158. You cannot change the number of primary shards in an index, once the index is
  159. created. However, an index can be split into a new index using the
  160. {ref}/indices-split-index.html[split index API].
  161. See also <<glossary-routing,routing>>.
  162. // end::primary-shard-def[]
  163. --
  164. [[glossary-query]] query ::
  165. +
  166. --
  167. // tag::query-def[]
  168. A request for information from {es}. You can think of a query as a question,
  169. written in a way {es} understands. A search consists of one or more queries
  170. combined.
  171. There are two types of queries: _scoring queries_ and _filters_. For more
  172. information about query types,
  173. see {ref}/query-filter-context.html[Query and filter context].
  174. // end::query-def[]
  175. --
  176. [[glossary-recovery]] recovery ::
  177. +
  178. --
  179. // tag::recovery-def[]
  180. Shard recovery is the process
  181. of syncing a <<glossary-replica-shard,replica shard>>
  182. from a <<glossary-primary-shard,primary shard>>.
  183. Upon completion,
  184. the replica shard is available for search.
  185. // tag::recovery-triggers[]
  186. Recovery automatically occurs
  187. during the following processes:
  188. * Node startup or failure.
  189. This type of recovery is called a *local store recovery*.
  190. * <<glossary-replica-shard,Primary shard replication>>.
  191. * Relocation of a shard to a different node in the same cluster.
  192. * {ref}/snapshots-restore-snapshot.html[Snapshot restoration].
  193. // end::recovery-triggers[]
  194. // end::recovery-def[]
  195. --
  196. [[glossary-reindex]] reindex ::
  197. // tag::reindex-def[]
  198. To cycle through some or all documents in one or more indices, re-writing them into the same or new index in a local or remote cluster. This is most commonly done to update mappings, or to upgrade Elasticsearch between two incompatible index versions.
  199. // end::reindex-def[]
  200. [[glossary-replica-shard]] replica shard ::
  201. +
  202. --
  203. // tag::replica-shard-def[]
  204. Each <<glossary-primary-shard,primary shard>> can have zero or more
  205. replicas. A replica is a copy of the primary shard, and has two
  206. purposes:
  207. 1. Increase failover: a replica shard can be promoted to a primary
  208. shard if the primary fails
  209. 2. Increase performance: get and search requests can be handled by
  210. primary or replica shards.
  211. By default, each primary shard has one replica, but the number of
  212. replicas can be changed dynamically on an existing index. A replica
  213. shard will never be started on the same node as its primary shard.
  214. // end::replica-shard-def[]
  215. --
  216. [[glossary-routing]] routing ::
  217. +
  218. --
  219. // tag::routing-def[]
  220. When you index a document, it is stored on a single
  221. <<glossary-primary-shard,primary shard>>. That shard is chosen by hashing
  222. the `routing` value. By default, the `routing` value is derived from
  223. the ID of the document or, if the document has a specified parent
  224. document, from the ID of the parent document (to ensure that child and
  225. parent documents are stored on the same shard).
  226. This value can be overridden by specifying a `routing` value at index
  227. time, or a {ref}/mapping-routing-field.html[routing field]
  228. in the <<glossary-mapping,mapping>>.
  229. // end::routing-def[]
  230. --
  231. [[glossary-shard]] shard ::
  232. +
  233. --
  234. // tag::shard-def[]
  235. A shard is a single Lucene instance. It is a low-level “worker” unit
  236. which is managed automatically by Elasticsearch. An index is a logical
  237. namespace which points to <<glossary-primary-shard,primary>> and
  238. <<glossary-replica-shard,replica>> shards.
  239. Other than defining the number of primary and replica shards that an
  240. index should have, you never need to refer to shards directly.
  241. Instead, your code should deal only with an index.
  242. Elasticsearch distributes shards amongst all <<glossary-node,nodes>> in the
  243. <<glossary-cluster,cluster>>, and can move shards automatically from one
  244. node to another in the case of node failure, or the addition of new
  245. nodes.
  246. // end::shard-def[]
  247. --
  248. [[glossary-shrink]] shrink ::
  249. // tag::shrink-def[]
  250. To reduce the amount of shards in an index.
  251. See the {ref}/indices-shrink-index.html[shrink index API].
  252. // end::shrink-def[]
  253. [[glossary-source_field]] source field ::
  254. // tag::source-field-def[]
  255. By default, the JSON document that you index will be stored in the
  256. `_source` field and will be returned by all get and search requests.
  257. This allows you access to the original object directly from search
  258. results, rather than requiring a second step to retrieve the object
  259. from an ID.
  260. // end::source-field-def[]
  261. [[glossary-split]] split ::
  262. // tag::split-def[]
  263. To grow the amount of shards in an index.
  264. See the {ref}/indices-split-index.html[split index API].
  265. // end::split-def[]
  266. [[glossary-term]] term ::
  267. +
  268. --
  269. // tag::term-def[]
  270. A term is an exact value that is indexed in Elasticsearch. The terms
  271. `foo`, `Foo`, `FOO` are NOT equivalent. Terms (i.e. exact values) can
  272. be searched for using _term_ queries.
  273. See also <<glossary-text,text>> and <<glossary-analysis,analysis>>.
  274. // end::term-def[]
  275. --
  276. [[glossary-text]] text ::
  277. +
  278. --
  279. // tag::text-def[]
  280. Text (or full text) is ordinary unstructured text, such as this
  281. paragraph. By default, text will be <<glossary-analysis,analyzed>> into
  282. <<glossary-term,terms>>, which is what is actually stored in the index.
  283. Text <<glossary-field,fields>> need to be analyzed at index time in order to
  284. be searchable as full text, and keywords in full text queries must be
  285. analyzed at search time to produce (and search for) the same terms
  286. that were generated at index time.
  287. See also <<glossary-term,term>> and <<glossary-analysis,analysis>>.
  288. // end::text-def[]
  289. --
  290. [[glossary-type]] type ::
  291. // tag::type-def[]
  292. A type used to represent the _type_ of document, e.g. an `email`, a `user`, or a `tweet`.
  293. Types are deprecated and are in the process of being removed.
  294. See {ref}/removal-of-types.html[Removal of mapping types].
  295. // end::type-def[]