浏览代码

Docs: Made multi-fields more prominent

Clinton Gormley 10 年之前
父节点
当前提交
9da8822aed
共有 2 个文件被更改,包括 25 次插入0 次删除
  1. 11 0
      docs/reference/mapping.asciidoc
  2. 14 0
      docs/reference/mapping/types.asciidoc

+ 11 - 0
docs/reference/mapping.asciidoc

@@ -53,6 +53,17 @@ Each field has a data `type` which can be:
 * or a specialised type like <<geo-point,`geo_point`>>,
   <<geo-shape,`geo_shape`>>, or <<search-suggesters-completion,`completion`>>.
 
+It is often useful to index the same field in different ways for different
+purposes. For instance, a `string` field could be <<mapping-index,indexed>> as
+an `analyzed` field for full-text search, and as a `not_analyzed` field for
+sorting or aggregations.  Alternatively, you could index a string field with
+the <<analysis-standard-analyzer,`standard` analyzer>>, the
+<<english-analyzer,`english`>> analyzer, and the
+<<french-analyzer,`french` analyzer>>.
+
+This is the purpose of _multi-fields_.  Most datatypes support multi-fields
+via the <<multi-fields>> parameter.
+
 [float]
 == Dynamic mapping
 

+ 14 - 0
docs/reference/mapping/types.asciidoc

@@ -40,6 +40,20 @@ Attachment datatype::
     which supports indexing ``attachments'' like Microsoft Office formats, Open
     Document formats, ePub, HTML, etc. into an `attachment` datatype.
 
+[float]
+=== Multi-fields
+
+It is often useful to index the same field in different ways for different
+purposes. For instance, a `string` field could be <<mapping-index,indexed>> as
+an `analyzed` field for full-text search, and as a `not_analyzed` field for
+sorting or aggregations.  Alternatively, you could index a string field with
+the <<analysis-standard-analyzer,`standard` analyzer>>, the
+<<english-analyzer,`english`>> analyzer, and the
+<<french-analyzer,`french` analyzer>>.
+
+This is the purpose of _multi-fields_.  Most datatypes support multi-fields
+via the <<multi-fields>> parameter.
+
 include::types/array.asciidoc[]
 
 include::types/binary.asciidoc[]