// 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: "palindrome_list",
  settings: {
    analysis: {
      analyzer: {
        whitespace_reverse_first_token: {
          tokenizer: "whitespace",
          filter: ["reverse_first_token"],
        },
      },
      filter: {
        reverse_first_token: {
          type: "condition",
          filter: ["reverse"],
          script: {
            source: "token.getPosition() === 0",
          },
        },
      },
    },
  },
});
console.log(response);
----
