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

49 lines
978 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_english: {
type: "standard",
stopwords: "_english_",
},
},
},
},
mappings: {
properties: {
my_text: {
type: "text",
analyzer: "standard",
fields: {
english: {
type: "text",
analyzer: "std_english",
},
},
},
},
},
});
console.log(response);
const response1 = await client.indices.analyze({
index: "my-index-000001",
field: "my_text",
text: "The old brown cow",
});
console.log(response1);
const response2 = await client.indices.analyze({
index: "my-index-000001",
field: "my_text.english",
text: "The old brown cow",
});
console.log(response2);
----