Files
elasticsearch-js/docs/doc_examples/060a56477e39f272fc5a9cfe47443cf1.asciidoc
github-actions[bot] b4eb8e5441 [Backport 8.15] Added/updated snippets for docs (#2319)
(cherry picked from commit f737290d10)

Co-authored-by: Josh Mock <joshua.mock@elastic.co>
2024-07-29 17:10:42 -05:00

33 lines
683 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",
settings: {
analysis: {
analyzer: {
my_analyzer: {
tokenizer: "my_tokenizer",
},
},
tokenizer: {
my_tokenizer: {
type: "simple_pattern",
pattern: "[0123456789]{3}",
},
},
},
},
});
console.log(response);
const response1 = await client.indices.analyze({
index: "my-index-000001",
analyzer: "my_analyzer",
text: "fd-786-335-514-x",
});
console.log(response1);
----