Skip to content

Commit b076a3e

Browse files
committed
[DOCS] Updates generated docs
1 parent 9226804 commit b076a3e

File tree

87 files changed

+1300
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1300
-110
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[source, ruby]
2+
----
3+
response = client.connector.update_api_key_id(
4+
connector_id: 'my-connector',
5+
body: {
6+
api_key_id: 'my-api-key-id',
7+
api_key_secret_id: 'my-connector-secret-id'
8+
}
9+
)
10+
puts response
11+
----
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[source, ruby]
2+
----
3+
response = client.search(
4+
body: {
5+
query: {
6+
weighted_tokens: {
7+
query_expansion_field: {
8+
tokens: {
9+
"2161": 0.4679,
10+
"2621": 0.307,
11+
"2782": 0.1299,
12+
"2851": 0.1056,
13+
"3088": 0.3041,
14+
"3376": 0.1038,
15+
"3467": 0.4873,
16+
"3684": 0.8958,
17+
"4380": 0.334,
18+
"4542": 0.4636,
19+
"4633": 2.2805,
20+
"4785": 1.2628,
21+
"4860": 1.0655,
22+
"5133": 1.0709,
23+
"7139": 1.0016,
24+
"7224": 0.2486,
25+
"7387": 0.0985,
26+
"7394": 0.0542,
27+
"8915": 0.369,
28+
"9156": 2.8947,
29+
"10505": 0.2771,
30+
"11464": 0.3996,
31+
"13525": 0.0088,
32+
"14178": 0.8161,
33+
"16893": 0.1376,
34+
"17851": 1.5348,
35+
"19939": 0.6012
36+
},
37+
pruning_config: {
38+
tokens_freq_ratio_threshold: 5,
39+
tokens_weight_threshold: 0.4,
40+
only_score_pruned_tokens: false
41+
}
42+
}
43+
}
44+
}
45+
}
46+
)
47+
puts response
48+
----
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[source, ruby]
2+
----
3+
response = client.ingest.put_pipeline(
4+
id: 'azure_openai_embeddings',
5+
body: {
6+
processors: [
7+
{
8+
inference: {
9+
model_id: 'azure_openai_embeddings',
10+
input_output: {
11+
input_field: 'content',
12+
output_field: 'content_embedding'
13+
}
14+
}
15+
}
16+
]
17+
}
18+
)
19+
puts response
20+
----
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[source, ruby]
2+
----
3+
response = client.search(
4+
body: {
5+
size: '1000'
6+
}
7+
)
8+
puts response
9+
----

docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
----
33
response = client.inference.inference(
44
task_type: 'sparse_embedding',
5-
model_id: 'my-elser-model',
5+
inference_id: 'my-elser-model',
66
body: {
77
input: 'The sky above the port was the color of television tuned to a dead channel.'
88
}

docs/examples/guide/efa924638043f3a6b23ccb824d757eba.asciidoc renamed to docs/examples/guide/16fc93f0e9a395d0668483d29e3df9d8.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ puts response
2727
2828
response = client.esql.query(
2929
body: {
30-
query: 'FROM mv | LIMIT 2'
30+
query: 'FROM mv | LIMIT 2',
31+
version: '2024.04.01'
3132
}
3233
)
3334
puts response

docs/examples/guide/ef175686e1179c4ed8fb96935895b3d0.asciidoc renamed to docs/examples/guide/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ response = client.indices.create(
1616
properties: {
1717
vector: {
1818
type: 'dense_vector',
19-
dims: 2
19+
dims: 2,
20+
index_options: {
21+
type: 'hnsw'
22+
}
2023
},
2124
text: {
2225
type: 'text',
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.create(
4+
index: 'my-index-000002',
5+
body: {
6+
mappings: {
7+
properties: {
8+
metrics: {
9+
subobjects: false,
10+
properties: {
11+
time: {
12+
type: 'object',
13+
properties: {
14+
min: {
15+
type: 'long'
16+
},
17+
max: {
18+
type: 'long'
19+
}
20+
}
21+
}
22+
}
23+
}
24+
}
25+
}
26+
}
27+
)
28+
puts response
29+
30+
response = client.indices.get_mapping(
31+
index: 'my-index-000002'
32+
)
33+
puts response
34+
----

docs/examples/guide/dddb6a6ebd145f8411c5b4910d332f87.asciidoc renamed to docs/examples/guide/1ce2cbfe1430c8837c19304a6b648af3.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
----
33
response = client.esql.query(
44
body: {
5-
query: 'FROM mv | EVAL b + 2, a + b | LIMIT 4'
5+
query: 'FROM mv | EVAL b + 2, a + b | LIMIT 4',
6+
version: '2024.04.01'
67
}
78
)
89
puts response
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[source, ruby]
2+
----
3+
response = client.connector.list(
4+
index_name: 'search-google-drive'
5+
)
6+
puts response
7+
----
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[source, ruby]
2+
----
3+
response = client.search(
4+
index: 'azure-openai-embeddings',
5+
body: {
6+
knn: {
7+
field: 'content_embedding',
8+
query_vector_builder: {
9+
text_embedding: {
10+
model_id: 'azure_openai_embeddings',
11+
model_text: 'Calculate fuel cost'
12+
}
13+
},
14+
k: 10,
15+
num_candidates: 100
16+
},
17+
_source: [
18+
'id',
19+
'content'
20+
]
21+
}
22+
)
23+
puts response
24+
----

docs/examples/guide/87457bb3467484bec3e9df4e25942ba6.asciidoc renamed to docs/examples/guide/2988a112b590ae2320940887125fe36a.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
----
33
response = client.esql.query(
44
body: {
5-
query: 'FROM mv | EVAL b=MV_MIN(b) | EVAL b + 2, a + b | LIMIT 4'
5+
query: 'FROM mv | EVAL b=MV_MIN(b) | EVAL b + 2, a + b | LIMIT 4',
6+
version: '2024.04.01'
67
}
78
)
89
puts response
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[source, ruby]
2+
----
3+
response = client.esql.async_query_get(
4+
id: 'FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=',
5+
wait_for_completion_timeout: '30s'
6+
)
7+
puts response
8+
----
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[source, ruby]
2+
----
3+
response = client.connector.sync_job_list(
4+
job_type: 'full,incremental'
5+
)
6+
puts response
7+
----
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.resolve_cluster(
4+
name: 'my-index*,clust*:my-index*'
5+
)
6+
puts response
7+
----
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.put_index_template(
4+
name: 'my-data-stream-template',
5+
body: {
6+
index_patterns: [
7+
'my-data-stream*'
8+
],
9+
data_stream: {},
10+
priority: 500,
11+
template: {
12+
mappings: {
13+
properties: {
14+
message: {
15+
type: 'text'
16+
}
17+
}
18+
}
19+
}
20+
}
21+
)
22+
puts response
23+
----

docs/examples/guide/01c0e302f4fd5118faf5e34f4a010ebf.asciidoc renamed to docs/examples/guide/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
[source, ruby]
22
----
33
response = client.indices.put_settings(
4-
index: 'my_source_index',
4+
index: 'my-index-000001',
55
body: {
6-
settings: {
7-
'index.blocks.write' => true
8-
}
6+
'index.indexing.slowlog.include.user' => true
97
}
108
)
119
puts response

docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[source, ruby]
22
----
3-
response = client.connector_sync_job.list(
3+
response = client.connector.sync_job_list(
44
from: 0,
55
size: 2
66
)

docs/examples/guide/1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc renamed to docs/examples/guide/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
[source, ruby]
22
----
33
response = client.indices.put_settings(
4-
index: 'my_source_index',
4+
index: 'my-index-000001',
55
body: {
6-
settings: {
7-
'index.blocks.write' => true
8-
}
6+
'index.search.slowlog.include.user' => true
97
}
108
)
119
puts response
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.resolve_cluster(
4+
name: 'not-present,clust*:my-index*,oldcluster:*',
5+
ignore_unavailable: false
6+
)
7+
puts response
8+
----
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.put_mapping(
4+
index: 'my-data-stream',
5+
write_index_only: true,
6+
body: {
7+
properties: {
8+
message: {
9+
type: 'text'
10+
}
11+
}
12+
}
13+
)
14+
puts response
15+
----

docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[source, ruby]
22
----
3-
response = client.connector_sync_job.check_in(
3+
response = client.connector.sync_job_check_in(
44
connector_sync_job_id: 'my-connector-sync-job'
55
)
66
puts response

docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[source, ruby]
22
----
3-
response = client.connector_sync_job.delete(
3+
response = client.connector.sync_job_delete(
44
connector_sync_job_id: 'my-connector-sync-job-id'
55
)
66
puts response
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[source, ruby]
2+
----
3+
response = client.connector.update_configuration(
4+
connector_id: 'my-spo-connector',
5+
body: {
6+
configuration: {
7+
client_id: {
8+
default_value: nil,
9+
depends_on: [],
10+
display: 'text',
11+
label: 'Client ID',
12+
options: [],
13+
order: 3,
14+
required: true,
15+
sensitive: false,
16+
tooltip: nil,
17+
type: 'str',
18+
ui_restrictions: [],
19+
validations: [],
20+
value: nil
21+
},
22+
secret_value: {
23+
default_value: nil,
24+
depends_on: [],
25+
display: 'text',
26+
label: 'Secret value',
27+
options: [],
28+
order: 4,
29+
required: true,
30+
sensitive: true,
31+
tooltip: nil,
32+
type: 'str',
33+
ui_restrictions: [],
34+
validations: [],
35+
value: nil
36+
}
37+
}
38+
}
39+
)
40+
puts response
41+
----
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[source, ruby]
2+
----
3+
response = client.ingest.put_pipeline(
4+
id: 'cohere_embeddings',
5+
body: {
6+
processors: [
7+
{
8+
inference: {
9+
model_id: 'cohere_embeddings',
10+
input_output: {
11+
input_field: 'content',
12+
output_field: 'content_embedding'
13+
}
14+
}
15+
}
16+
]
17+
}
18+
)
19+
puts response
20+
----

0 commit comments

Comments
 (0)