29 lines
551 B
Plaintext
29 lines
551 B
Plaintext
// 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: "my-explicit-mappings-books",
|
|
mappings: {
|
|
dynamic: false,
|
|
properties: {
|
|
name: {
|
|
type: "text",
|
|
},
|
|
author: {
|
|
type: "text",
|
|
},
|
|
release_date: {
|
|
type: "date",
|
|
format: "yyyy-MM-dd",
|
|
},
|
|
page_count: {
|
|
type: "integer",
|
|
},
|
|
},
|
|
},
|
|
});
|
|
console.log(response);
|
|
----
|