// 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.create({
  index: "test",
  settings: {
    analysis: {
      filter: {
        email: {
          type: "pattern_capture",
          preserve_original: true,
          patterns: ["([^@]+)", "(\\p{L}+)", "(\\d+)", "@(.+)"],
        },
      },
      analyzer: {
        email: {
          tokenizer: "uax_url_email",
          filter: ["email", "lowercase", "unique"],
        },
      },
    },
  },
});
console.log(response);
----
