浏览代码

[DOCS] Explicitly document enrich `target_field` includes `match_field` (#49407)

When the enrich processor appends enrich data to an incoming document,
it adds a `target_field` to contain the enrich data.

This `target_field` contains both the `match_field` AND `enrich_fields`
specified in the enrich policy.

Previously, this was reflected in the documented example but not
explicitly stated. This adds several explicit statements to the docs.
James Rodewig 5 年之前
父节点
当前提交
37baa50815
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 5 1
      docs/reference/ingest/enrich.asciidoc
  2. 1 1
      docs/reference/ingest/processors/enrich.asciidoc

+ 5 - 1
docs/reference/ingest/enrich.asciidoc

@@ -180,7 +180,7 @@ When defining the enrich processor, you must include at least the following:
 * The enrich policy to use.
 * The field used to match incoming documents to the documents in your enrich index.
 * The target field to add to incoming documents. This target field contains the
-enrich fields specified in your enrich policy.
+match and enrich fields specified in your enrich policy.
 
 You also can use the `max_matches` option to set the number of enrich documents
 an incoming document can match. If set to the default of `1`, data is added to
@@ -371,6 +371,8 @@ the pipeline, add an <<enrich-processor,enrich processor>> that includes:
 * The `field` of incoming documents used to match the geo_shape of documents
   from the enrich index.
 * The `target_field` used to store appended enrich data for incoming documents.
+  This field contains the `match_field` and `enrich_fields` specified in your
+  enrich policy.
 * The `shape_relation`, which indicates how the processor matches geo_shapes in
   incoming documents to geo_shapes in documents from the enrich index. See
   <<_spatial_relations>> for valid options and more information.
@@ -526,6 +528,8 @@ the pipeline, add an <<enrich-processor,enrich processor>> that includes:
 * The `field` of incoming documents used to match documents
   from the enrich index.
 * The `target_field` used to store appended enrich data for incoming documents.
+  This field contains the `match_field` and `enrich_fields` specified in your
+  enrich policy.
 
 [source,console]
 ----

+ 1 - 1
docs/reference/ingest/processors/enrich.asciidoc

@@ -13,7 +13,7 @@ See <<ingest-enriching-data,enrich data>> section for more information about how
 | Name               | Required  | Default              | Description
 | `policy_name`      | yes       | -                    | The name of the enrich policy to use.
 | `field`            | yes       | -                    | The field in the input document that matches the policies match_field used to retrieve the enrichment data. Supports <<accessing-template-fields,template snippets>>.
-| `target_field`     | yes       | -                    | The field that will be used for the enrichment data. Supports <<accessing-template-fields,template snippets>>.
+| `target_field`     | yes       | -                    | Field added to incoming documents to contain enrich data. This field contains both the `match_field` and `enrich_fields` specified in the <<enrich-policy-definition,enrich policy>>. Supports <<accessing-template-fields,template snippets>>.
 | `ignore_missing`   | no        | false                | If `true` and `field` does not exist, the processor quietly exits without modifying the document
 | `override`         | no        | true                 | If processor will update fields with pre-existing non-null-valued field. When set to `false`, such fields will not be touched.
 | `max_matches`      | no        | 1                    | The maximum number of matched documents to include under the configured target field. The `target_field` will be turned into a json array if `max_matches` is higher than 1, otherwise `target_field` will become a json object. In order to avoid documents getting too large, the maximum allowed value is 128.