// 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: "geoip",
  description: "Add ip geolocation info",
  processors: [
    {
      geoip: {
        field: "ip",
        target_field: "geo",
        database_file: "GeoLite2-Country.mmdb",
      },
    },
  ],
});
console.log(response);

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

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