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

25 lines
475 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.putMapping({
index: "range_index",
properties: {
ip_allowlist: {
type: "ip_range",
},
},
});
console.log(response);
const response1 = await client.index({
index: "range_index",
id: 2,
document: {
ip_allowlist: "192.168.0.0/16",
},
});
console.log(response1);
----