Auto-generated code for 8.15 (#2385)
This commit is contained in:
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
kwd: {
|
kwd: {
|
||||||
type: "keyword",
|
type: "keyword",
|
||||||
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.cluster.reroute({
|
const response = await client.cluster.reroute();
|
||||||
metric: "none",
|
|
||||||
});
|
|
||||||
console.log(response);
|
console.log(response);
|
||||||
----
|
----
|
||||||
@ -8,6 +8,7 @@ const response = await client.esql.asyncQuery({
|
|||||||
body: {
|
body: {
|
||||||
query:
|
query:
|
||||||
"\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
"\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||||
|
include_ccs_metadata: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
@ -9,7 +9,7 @@ const response = await client.connector.put({
|
|||||||
name: "My Connector",
|
name: "My Connector",
|
||||||
description: "My Connector to sync data to Elastic index from Google Drive",
|
description: "My Connector to sync data to Elastic index from Google Drive",
|
||||||
service_type: "google_drive",
|
service_type: "google_drive",
|
||||||
language: "english",
|
language: "en",
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
----
|
----
|
||||||
19
docs/doc_examples/1a7483796087053ba55029d0dc2ab356.asciidoc
Normal file
19
docs/doc_examples/1a7483796087053ba55029d0dc2ab356.asciidoc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// 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.index({
|
||||||
|
index: "mv",
|
||||||
|
refresh: "true",
|
||||||
|
document: {
|
||||||
|
a: [2, null, 1],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
|
||||||
|
const response1 = await client.esql.query({
|
||||||
|
query: "FROM mv | LIMIT 1",
|
||||||
|
});
|
||||||
|
console.log(response1);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
card: {
|
card: {
|
||||||
type: "wildcard",
|
type: "wildcard",
|
||||||
@ -52,6 +52,12 @@ const response = await client.simulate.ingest({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
index_template_substitutions: {
|
||||||
|
"my-index-template": {
|
||||||
|
index_patterns: ["my-index-*"],
|
||||||
|
composed_of: ["component_template_1", "component_template_2"],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
77
docs/doc_examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc
Normal file
77
docs/doc_examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
// 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",
|
||||||
|
mappings: {
|
||||||
|
properties: {
|
||||||
|
attributes: {
|
||||||
|
type: "passthrough",
|
||||||
|
priority: 10,
|
||||||
|
properties: {
|
||||||
|
id: {
|
||||||
|
type: "keyword",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
|
||||||
|
const response1 = await client.index({
|
||||||
|
index: "my-index-000001",
|
||||||
|
id: 1,
|
||||||
|
document: {
|
||||||
|
attributes: {
|
||||||
|
id: "foo",
|
||||||
|
zone: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response1);
|
||||||
|
|
||||||
|
const response2 = await client.search({
|
||||||
|
index: "my-index-000001",
|
||||||
|
query: {
|
||||||
|
bool: {
|
||||||
|
must: [
|
||||||
|
{
|
||||||
|
match: {
|
||||||
|
id: "foo",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: {
|
||||||
|
zone: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response2);
|
||||||
|
|
||||||
|
const response3 = await client.search({
|
||||||
|
index: "my-index-000001",
|
||||||
|
query: {
|
||||||
|
bool: {
|
||||||
|
must: [
|
||||||
|
{
|
||||||
|
match: {
|
||||||
|
"attributes.id": "foo",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: {
|
||||||
|
"attributes.zone": 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response3);
|
||||||
|
----
|
||||||
32
docs/doc_examples/55085e6a2891040b6ac696561d0787c8.asciidoc
Normal file
32
docs/doc_examples/55085e6a2891040b6ac696561d0787c8.asciidoc
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
// 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-000002",
|
||||||
|
mappings: {
|
||||||
|
properties: {
|
||||||
|
attributes: {
|
||||||
|
type: "passthrough",
|
||||||
|
priority: 10,
|
||||||
|
properties: {
|
||||||
|
id: {
|
||||||
|
type: "keyword",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"resource.attributes": {
|
||||||
|
type: "passthrough",
|
||||||
|
priority: 20,
|
||||||
|
properties: {
|
||||||
|
id: {
|
||||||
|
type: "keyword",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
agg_metric: {
|
agg_metric: {
|
||||||
type: "aggregate_metric_double",
|
type: "aggregate_metric_double",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
my_range: {
|
my_range: {
|
||||||
type: "long_range",
|
type: "long_range",
|
||||||
22
docs/doc_examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc
Normal file
22
docs/doc_examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// 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: "semantic-embeddings",
|
||||||
|
mappings: {
|
||||||
|
properties: {
|
||||||
|
semantic_text: {
|
||||||
|
type: "semantic_text",
|
||||||
|
inference_id: "my-elser-endpoint",
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
type: "text",
|
||||||
|
copy_to: "semantic_text",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
@ -8,6 +8,7 @@ const response = await client.esql.asyncQuery({
|
|||||||
body: {
|
body: {
|
||||||
query:
|
query:
|
||||||
"\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
"\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||||
|
include_ccs_metadata: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
@ -5,9 +5,13 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
flattened: {
|
flattened: {
|
||||||
type: "flattened",
|
type: "flattened",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
text: {
|
text: {
|
||||||
type: "text",
|
type: "text",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
versions: {
|
versions: {
|
||||||
type: "version",
|
type: "version",
|
||||||
@ -4,7 +4,6 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.cluster.reroute({
|
const response = await client.cluster.reroute({
|
||||||
metric: "none",
|
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
allocate_empty_primary: {
|
allocate_empty_primary: {
|
||||||
49
docs/doc_examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc
Normal file
49
docs/doc_examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
// 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.putIndexTemplate({
|
||||||
|
name: "my-metrics",
|
||||||
|
index_patterns: ["metrics-mymetrics-*"],
|
||||||
|
priority: 200,
|
||||||
|
data_stream: {},
|
||||||
|
template: {
|
||||||
|
settings: {
|
||||||
|
"index.mode": "time_series",
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
|
properties: {
|
||||||
|
attributes: {
|
||||||
|
type: "passthrough",
|
||||||
|
priority: 10,
|
||||||
|
time_series_dimension: true,
|
||||||
|
properties: {
|
||||||
|
"host.name": {
|
||||||
|
type: "keyword",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cpu: {
|
||||||
|
type: "integer",
|
||||||
|
time_series_metric: "counter",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
|
||||||
|
const response1 = await client.index({
|
||||||
|
index: "metrics-mymetrics-test",
|
||||||
|
document: {
|
||||||
|
"@timestamp": "2020-01-01T00:00:00.000Z",
|
||||||
|
attributes: {
|
||||||
|
"host.name": "foo",
|
||||||
|
zone: "bar",
|
||||||
|
},
|
||||||
|
cpu: 10,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response1);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
flattened: {
|
flattened: {
|
||||||
type: "flattened",
|
type: "flattened",
|
||||||
@ -3,9 +3,8 @@
|
|||||||
|
|
||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.snapshot.create({
|
const response = await client.snapshot.repositoryVerifyIntegrity({
|
||||||
repository: "my_repository",
|
name: "my_repository",
|
||||||
snapshot: "_verify_integrity",
|
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
----
|
----
|
||||||
|
|||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx_keep",
|
index: "idx_keep",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
path: {
|
path: {
|
||||||
type: "object",
|
type: "object",
|
||||||
35
docs/doc_examples/9ad0864bcd665b63551e944653d32423.asciidoc
Normal file
35
docs/doc_examples/9ad0864bcd665b63551e944653d32423.asciidoc
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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.search({
|
||||||
|
index: "semantic-embeddings",
|
||||||
|
retriever: {
|
||||||
|
rrf: {
|
||||||
|
retrievers: [
|
||||||
|
{
|
||||||
|
standard: {
|
||||||
|
query: {
|
||||||
|
match: {
|
||||||
|
content: "How to avoid muscle soreness while running?",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
standard: {
|
||||||
|
query: {
|
||||||
|
semantic: {
|
||||||
|
field: "semantic_text",
|
||||||
|
query: "How to avoid muscle soreness while running?",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
@ -4,7 +4,6 @@
|
|||||||
[source, js]
|
[source, js]
|
||||||
----
|
----
|
||||||
const response = await client.cluster.reroute({
|
const response = await client.cluster.reroute({
|
||||||
metric: "none",
|
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
move: {
|
move: {
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
flattened: {
|
flattened: {
|
||||||
type: "flattened",
|
type: "flattened",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
my_range: {
|
my_range: {
|
||||||
type: "long_range",
|
type: "long_range",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
date: {
|
date: {
|
||||||
type: "date_nanos",
|
type: "date_nanos",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
bool: {
|
bool: {
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
my_range: {
|
my_range: {
|
||||||
type: "integer_range",
|
type: "integer_range",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
f: {
|
f: {
|
||||||
type: "scaled_float",
|
type: "scaled_float",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
my_range: {
|
my_range: {
|
||||||
type: "date_range",
|
type: "date_range",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
point: {
|
point: {
|
||||||
type: "geo_point",
|
type: "geo_point",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
long: {
|
long: {
|
||||||
type: "long",
|
type: "long",
|
||||||
17
docs/doc_examples/b9ba66209b7fcc111a7bcef0b3e00052.asciidoc
Normal file
17
docs/doc_examples/b9ba66209b7fcc111a7bcef0b3e00052.asciidoc
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// 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.index({
|
||||||
|
index: "my-index-000001",
|
||||||
|
id: 1,
|
||||||
|
document: {
|
||||||
|
attributes: {
|
||||||
|
id: "foo",
|
||||||
|
},
|
||||||
|
id: "bar",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
date: {
|
date: {
|
||||||
type: "date",
|
type: "date",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
kwd: {
|
kwd: {
|
||||||
type: "keyword",
|
type: "keyword",
|
||||||
37
docs/doc_examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc
Normal file
37
docs/doc_examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
// 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.search({
|
||||||
|
index: "my-index",
|
||||||
|
size: 10,
|
||||||
|
knn: {
|
||||||
|
query_vector: [0.04283529, 0.85670587, -0.51402352, 0],
|
||||||
|
field: "my_int4_vector",
|
||||||
|
k: 20,
|
||||||
|
num_candidates: 50,
|
||||||
|
},
|
||||||
|
rescore: {
|
||||||
|
window_size: 20,
|
||||||
|
query: {
|
||||||
|
rescore_query: {
|
||||||
|
script_score: {
|
||||||
|
query: {
|
||||||
|
match_all: {},
|
||||||
|
},
|
||||||
|
script: {
|
||||||
|
source: "(dotProduct(params.queryVector, 'my_int4_vector') + 1.0)",
|
||||||
|
params: {
|
||||||
|
queryVector: [0.04283529, 0.85670587, -0.51402352, 0],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
query_weight: 0,
|
||||||
|
rescore_query_weight: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
ip: {
|
ip: {
|
||||||
type: "ip",
|
type: "ip",
|
||||||
28
docs/doc_examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc
Normal file
28
docs/doc_examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// 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.search({
|
||||||
|
index: "my-index",
|
||||||
|
size: 10,
|
||||||
|
query: {
|
||||||
|
script_score: {
|
||||||
|
query: {
|
||||||
|
knn: {
|
||||||
|
query_vector: [0.04283529, 0.85670587, -0.51402352, 0],
|
||||||
|
field: "my_int4_vector",
|
||||||
|
num_candidates: 20,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
script: {
|
||||||
|
source: "(dotProduct(params.queryVector, 'my_int4_vector') + 1.0)",
|
||||||
|
params: {
|
||||||
|
queryVector: [0.04283529, 0.85670587, -0.51402352, 0],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
14
docs/doc_examples/ddaadd91b7743a1c7e946ce1b593cd1b.asciidoc
Normal file
14
docs/doc_examples/ddaadd91b7743a1c7e946ce1b593cd1b.asciidoc
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// 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.inference.inference({
|
||||||
|
task_type: "my-inference-endpoint",
|
||||||
|
inference_id: "_update",
|
||||||
|
service_settings: {
|
||||||
|
api_key: "<API_KEY>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
22
docs/doc_examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc
Normal file
22
docs/doc_examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// 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-byte-quantized-index",
|
||||||
|
mappings: {
|
||||||
|
properties: {
|
||||||
|
my_vector: {
|
||||||
|
type: "dense_vector",
|
||||||
|
dims: 64,
|
||||||
|
index: true,
|
||||||
|
index_options: {
|
||||||
|
type: "bbq_hnsw",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
text: {
|
text: {
|
||||||
type: "text",
|
type: "text",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
kwd: {
|
kwd: {
|
||||||
type: "keyword",
|
type: "keyword",
|
||||||
@ -5,10 +5,16 @@
|
|||||||
----
|
----
|
||||||
const response = await client.indices.create({
|
const response = await client.indices.create({
|
||||||
index: "idx",
|
index: "idx",
|
||||||
mappings: {
|
settings: {
|
||||||
_source: {
|
index: {
|
||||||
mode: "synthetic",
|
mapping: {
|
||||||
|
source: {
|
||||||
|
mode: "synthetic",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
my_range: {
|
my_range: {
|
||||||
type: "ip_range",
|
type: "ip_range",
|
||||||
@ -9328,7 +9328,7 @@ export interface ConnectorFeatureEnabled {
|
|||||||
export interface ConnectorFilteringAdvancedSnippet {
|
export interface ConnectorFilteringAdvancedSnippet {
|
||||||
created_at?: DateTime
|
created_at?: DateTime
|
||||||
updated_at?: DateTime
|
updated_at?: DateTime
|
||||||
value: Record<string, any>
|
value: any
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ConnectorFilteringConfig {
|
export interface ConnectorFilteringConfig {
|
||||||
@ -16216,7 +16216,7 @@ export interface NodesInfoNodeInfoXpackLicenseType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface NodesInfoNodeInfoXpackSecurity {
|
export interface NodesInfoNodeInfoXpackSecurity {
|
||||||
http: NodesInfoNodeInfoXpackSecuritySsl
|
http?: NodesInfoNodeInfoXpackSecuritySsl
|
||||||
enabled: string
|
enabled: string
|
||||||
transport?: NodesInfoNodeInfoXpackSecuritySsl
|
transport?: NodesInfoNodeInfoXpackSecuritySsl
|
||||||
authc?: NodesInfoNodeInfoXpackSecurityAuthc
|
authc?: NodesInfoNodeInfoXpackSecurityAuthc
|
||||||
@ -18323,7 +18323,8 @@ export interface SnapshotRestoreRequest extends RequestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface SnapshotRestoreResponse {
|
export interface SnapshotRestoreResponse {
|
||||||
snapshot: SnapshotRestoreSnapshotRestore
|
accepted?: boolean
|
||||||
|
snapshot?: SnapshotRestoreSnapshotRestore
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SnapshotRestoreSnapshotRestore {
|
export interface SnapshotRestoreSnapshotRestore {
|
||||||
|
|||||||
@ -9429,7 +9429,7 @@ export interface ConnectorFeatureEnabled {
|
|||||||
export interface ConnectorFilteringAdvancedSnippet {
|
export interface ConnectorFilteringAdvancedSnippet {
|
||||||
created_at?: DateTime
|
created_at?: DateTime
|
||||||
updated_at?: DateTime
|
updated_at?: DateTime
|
||||||
value: Record<string, any>
|
value: any
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ConnectorFilteringConfig {
|
export interface ConnectorFilteringConfig {
|
||||||
@ -16568,7 +16568,7 @@ export interface NodesInfoNodeInfoXpackLicenseType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface NodesInfoNodeInfoXpackSecurity {
|
export interface NodesInfoNodeInfoXpackSecurity {
|
||||||
http: NodesInfoNodeInfoXpackSecuritySsl
|
http?: NodesInfoNodeInfoXpackSecuritySsl
|
||||||
enabled: string
|
enabled: string
|
||||||
transport?: NodesInfoNodeInfoXpackSecuritySsl
|
transport?: NodesInfoNodeInfoXpackSecuritySsl
|
||||||
authc?: NodesInfoNodeInfoXpackSecurityAuthc
|
authc?: NodesInfoNodeInfoXpackSecurityAuthc
|
||||||
@ -18790,7 +18790,8 @@ export interface SnapshotRestoreRequest extends RequestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface SnapshotRestoreResponse {
|
export interface SnapshotRestoreResponse {
|
||||||
snapshot: SnapshotRestoreSnapshotRestore
|
accepted?: boolean
|
||||||
|
snapshot?: SnapshotRestoreSnapshotRestore
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SnapshotRestoreSnapshotRestore {
|
export interface SnapshotRestoreSnapshotRestore {
|
||||||
|
|||||||
Reference in New Issue
Block a user