Files
elasticsearch-js/docs/doc_examples/9559de0c2190f99fcc344887fc7b232a.asciidoc
2024-07-29 17:10:05 -05:00

37 lines
663 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: "bicycles",
mappings: {
properties: {
cycle_type: {
type: "constant_keyword",
value: "bicycle",
},
name: {
type: "text",
},
},
},
});
console.log(response);
const response1 = await client.indices.create({
index: "other_cycles",
mappings: {
properties: {
cycle_type: {
type: "keyword",
},
name: {
type: "text",
},
},
},
});
console.log(response1);
----