// 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: "set-foo",
  description: "sets foo",
  processors: [
    {
      set: {
        field: "foo",
        value: "bar",
      },
    },
  ],
});
console.log(response);

const response1 = await client.updateByQuery({
  index: "my-index-000001",
  pipeline: "set-foo",
});
console.log(response1);
----
