Added/updated snippets for docs (#2318)
This commit is contained in:
43
docs/doc_examples/464dffb6a6e24a860223d1c32b232f95.asciidoc
Normal file
43
docs/doc_examples/464dffb6a6e24a860223d1c32b232f95.asciidoc
Normal file
@ -0,0 +1,43 @@
|
||||
// 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: {
|
||||
filter: {
|
||||
my_shingle_filter: {
|
||||
type: "shingle",
|
||||
min_shingle_size: 5,
|
||||
max_shingle_size: 5,
|
||||
output_unigrams: false,
|
||||
},
|
||||
my_minhash_filter: {
|
||||
type: "min_hash",
|
||||
hash_count: 1,
|
||||
bucket_count: 512,
|
||||
hash_set_size: 1,
|
||||
with_rotation: true,
|
||||
},
|
||||
},
|
||||
analyzer: {
|
||||
my_analyzer: {
|
||||
tokenizer: "standard",
|
||||
filter: ["my_shingle_filter", "my_minhash_filter"],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
mappings: {
|
||||
properties: {
|
||||
fingerprint: {
|
||||
type: "text",
|
||||
analyzer: "my_analyzer",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user