// 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.indices.putMapping({
  index: "cooking_blog",
  properties: {
    title: {
      type: "text",
      analyzer: "standard",
      fields: {
        keyword: {
          type: "keyword",
          ignore_above: 256,
        },
      },
    },
    description: {
      type: "text",
      fields: {
        keyword: {
          type: "keyword",
        },
      },
    },
    author: {
      type: "text",
      fields: {
        keyword: {
          type: "keyword",
        },
      },
    },
    date: {
      type: "date",
      format: "yyyy-MM-dd",
    },
    category: {
      type: "text",
      fields: {
        keyword: {
          type: "keyword",
        },
      },
    },
    tags: {
      type: "text",
      fields: {
        keyword: {
          type: "keyword",
        },
      },
    },
    rating: {
      type: "float",
    },
  },
});
console.log(response);
----
