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

47 lines
924 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: "geocells",
mappings: {
properties: {
geocell: {
type: "geo_shape",
},
},
},
});
console.log(response);
const response1 = await client.ingest.putPipeline({
id: "geotile2shape",
description: "translate rectangular z/x/y geotile to bounding box",
processors: [
{
geo_grid: {
field: "geocell",
tile_type: "geotile",
},
},
],
});
console.log(response1);
const response2 = await client.ingest.putPipeline({
id: "geohex2shape",
description: "translate H3 cell to polygon",
processors: [
{
geo_grid: {
field: "geocell",
tile_type: "geohex",
target_format: "wkt",
},
},
],
});
console.log(response2);
----