Skip to content

Commit

Permalink
[DOC] Revise step 2 input code example (#5361)
Browse files Browse the repository at this point in the history
* Revise step 2 input code example

Co-authored-by: Heemin Kim <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>

---------

Signed-off-by: Melissa Vagi <[email protected]>
Co-authored-by: Heemin Kim <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
  • Loading branch information
3 people committed Dec 20, 2023
1 parent 1e3a715 commit 5c8746d
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions _ingest-pipelines/processors/ip2geo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5c8746d

Please sign in to comment.