From 91c54c300db2356afc477faaebd0aefc7b39533f Mon Sep 17 00:00:00 2001 From: Melissa Vagi Date: Tue, 7 Nov 2023 14:41:27 -0700 Subject: [PATCH] [DOC] Revise step 2 input code example (#5361) * Revise step 2 input code example Co-authored-by: Heemin Kim Signed-off-by: Melissa Vagi --------- Signed-off-by: Melissa Vagi Co-authored-by: Heemin Kim Co-authored-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> --- _ingest-pipelines/processors/ip2geo.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/_ingest-pipelines/processors/ip2geo.md b/_ingest-pipelines/processors/ip2geo.md index cf31943b..eb97e543 100644 --- a/_ingest-pipelines/processors/ip2geo.md +++ b/_ingest-pipelines/processors/ip2geo.md @@ -197,14 +197,32 @@ PUT /_ingest/pipeline/my-pipeline To test the pipeline, run the following query: ```json -POST _ingest/pipeline/my-id/_simulate +POST _ingest/pipeline/my-pipeline/_simulate { "docs": [ { - "_index":"my-index", - "_id":"my-id", + "_index": "testindex1", + "_id": "1", + "_source": { + "ip": "172.0.0.1", + } + } + ] +} +``` + +#### Response + +The following response confirms that the pipeline is working as expected: + +```json +{ + "docs": [ + { + "_index":"testindex1", + "_id":"1", "_source":{ - "my_ip_field":"172.0.0.1", + "ip":"172.0.0.1", "ip2geo":{ "continent_name":"North America", "region_iso_code":"AL",