[DOCS] Add generated_dest_index to preview transform API (#53905)

This commit is contained in:
Lisa Cawley 2020-03-23 09:40:25 -07:00 committed by lcawl
parent eda023e2c3
commit 8b3ef4ac21
1 changed files with 47 additions and 9 deletions

View File

@ -32,6 +32,16 @@ This API generates a preview of the results that you will get when you run the
configuration. It returns a maximum of 100 results. The calculations are based configuration. It returns a maximum of 100 results. The calculations are based
on all the current data in the source index. on all the current data in the source index.
It also generates a list of mappings and settings for the destination index.
If the destination index does not exist when you start a {transform}, these are
the mappings and settings that are used. These values are determined based on
the field types of the source index and the {transform} aggregations.
TIP: There are some <<transform-aggresponse-limitations,limitations>> that
might result in poor mappings. As a work-around, create the destination index
or an index template with your preferred mappings before you start the
{transform}.
[[preview-transform-request-body]] [[preview-transform-request-body]]
==== {api-request-body-title} ==== {api-request-body-title}
@ -108,6 +118,15 @@ include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time-field]
representation of the documents that would be created in the destination index representation of the documents that would be created in the destination index
by the {transform}. by the {transform}.
`generated_dest_index`::
(object) Contains details about the destination index.
`mappings`:::
(object) The <<mapping,mappings>> for each document in the destination index.
`settings`:::
(object) The <<index-modules-settings,index settings>> for the destination
index.
`aliases`::: The aliases for the destination index.
==== {api-examples-title} ==== {api-examples-title}
[source,console] [source,console]
@ -156,15 +175,34 @@ The data that is returned for this example is as follows:
} }
... ...
], ],
"mappings": { "generated_dest_index" : {
"properties": { "mappings" : {
"max_price": { "_meta" : {
"type": "double" "_transform" : {
"transform" : "transform-preview",
"version" : {
"created" : "7.7.0"
},
"creation_date_in_millis" : 1584738236757
},
"created_by" : "transform"
}, },
"customer_id": { "properties" : {
"type": "keyword" "max_price" : {
"type" : "half_float"
},
"customer_id" : {
"type" : "keyword"
}
} }
} },
"settings" : {
"index" : {
"number_of_shards" : "1",
"auto_expand_replicas" : "0-1"
}
},
"aliases" : { }
} }
} }
---- ----