// 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.updateByQuery({
  index: "INDEX_NAME",
  conflicts: "proceed",
  query: {
    bool: {
      filter: [
        {
          match: {
            object_type: "drive_item",
          },
        },
        {
          exists: {
            field: "file",
          },
        },
        {
          range: {
            lastModifiedDateTime: {
              lte: "now-180d",
            },
          },
        },
      ],
    },
  },
  script: {
    source: "ctx._source.body = ''",
    lang: "painless",
  },
});
console.log(response);
----
