glossary.asciidoc 9.4 KB

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