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

36 lines
711 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-index-000001",
mappings: {
dynamic_templates: [
{
ip_fields: {
match: ["ip_*", "*_ip"],
unmatch: ["one*", "*two"],
mapping: {
type: "ip",
},
},
},
],
},
});
console.log(response);
const response1 = await client.index({
index: "my-index",
id: 1,
document: {
one_ip: "will not match",
ip_two: "will not match",
three_ip: "12.12.12.12",
ip_four: "13.13.13.13",
},
});
console.log(response1);
----