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

[source, js]
----
const response = await client.indices.create({
  index: "text_payloads",
  mappings: {
    properties: {
      text: {
        type: "text",
        term_vector: "with_positions_payloads",
        analyzer: "payload_delimiter",
      },
    },
  },
  settings: {
    analysis: {
      analyzer: {
        payload_delimiter: {
          tokenizer: "whitespace",
          filter: ["delimited_payload"],
        },
      },
    },
  },
});
console.log(response);
----
