// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.mjs` to generate the docs examples

[source, js]
----
const response = await client.ingest.putPipeline({
  id: "ip_location",
  description: "Add ip geolocation info",
  processors: [
    {
      ip_location: {
        field: "ip",
      },
    },
  ],
});
console.log(response);

const response1 = await client.index({
  index: "my-index-000001",
  id: "my_id",
  pipeline: "ip_location",
  document: {
    ip: "80.231.5.0",
  },
});
console.log(response1);

const response2 = await client.get({
  index: "my-index-000001",
  id: "my_id",
});
console.log(response2);
----
