Files
elasticsearch-js/docs/doc_examples/5daf8ede198be9b118da5bee9896cb00.asciidoc
2024-10-28 15:12:59 -05:00

48 lines
775 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: "idx",
settings: {
index: {
mapping: {
source: {
mode: "synthetic",
},
},
},
},
mappings: {
properties: {
flattened: {
type: "flattened",
},
},
},
});
console.log(response);
const response1 = await client.index({
index: "idx",
id: 1,
document: {
flattened: {
field: [
"apple",
"apple",
"banana",
"avocado",
"10",
"200",
"AVOCADO",
"Banana",
"Tangerine",
],
},
},
});
console.log(response1);
----