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

[source, js]
----
const response0 = await client.ingest.putPipeline({
  id: 'set-foo',
  body: {
    description: 'sets foo',
    processors: [
      {
        set: {
          field: 'foo',
          value: 'bar'
        }
      }
    ]
  }
})
console.log(response0)

const response1 = await client.updateByQuery({
  index: 'twitter',
  pipeline: 'set-foo'
})
console.log(response1)
----

