// 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: "passage_vectors",
  mappings: {
    properties: {
      full_text: {
        type: "text",
      },
      creation_time: {
        type: "date",
      },
      paragraph: {
        type: "nested",
        properties: {
          vector: {
            type: "dense_vector",
            dims: 2,
            index_options: {
              type: "hnsw",
            },
          },
          text: {
            type: "text",
            index: false,
          },
        },
      },
    },
  },
});
console.log(response);
----
