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

57 lines
1.1 KiB
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: "place",
mappings: {
properties: {
suggest: {
type: "completion",
contexts: [
{
name: "place_type",
type: "category",
},
{
name: "location",
type: "geo",
precision: 4,
},
],
},
},
},
});
console.log(response);
const response1 = await client.indices.create({
index: "place_path_category",
mappings: {
properties: {
suggest: {
type: "completion",
contexts: [
{
name: "place_type",
type: "category",
path: "cat",
},
{
name: "location",
type: "geo",
precision: 4,
path: "loc",
},
],
},
loc: {
type: "geo_point",
},
},
},
});
console.log(response1);
----