(cherry picked from commit f737290d10)
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
30 lines
678 B
Plaintext
30 lines
678 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_custom_analyzer: {
|
|
type: "custom",
|
|
tokenizer: "standard",
|
|
char_filter: ["html_strip"],
|
|
filter: ["lowercase", "asciifolding"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
console.log(response);
|
|
|
|
const response1 = await client.indices.analyze({
|
|
index: "my-index-000001",
|
|
analyzer: "my_custom_analyzer",
|
|
text: "Is this déjà vu</b>?",
|
|
});
|
|
console.log(response1);
|
|
----
|