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

44 lines
899 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: {
std_folded: {
type: "custom",
tokenizer: "standard",
filter: ["lowercase", "asciifolding"],
},
},
},
},
mappings: {
properties: {
my_text: {
type: "text",
analyzer: "std_folded",
},
},
},
});
console.log(response);
const response1 = await client.indices.analyze({
index: "my-index-000001",
analyzer: "std_folded",
text: "Is this déjà vu?",
});
console.log(response1);
const response2 = await client.indices.analyze({
index: "my-index-000001",
field: "my_text",
text: "Is this déjà vu?",
});
console.log(response2);
----