Skip to content

Commit 9aab364

Browse files
committed
[DOCS] Updates generated docs
1 parent e590347 commit 9aab364

File tree

44 files changed

+685
-31
lines changed

Some content is hidden

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

44 files changed

+685
-31
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[source, ruby]
2+
----
3+
response = client.index(
4+
index: 'my-index-000001',
5+
id: 5,
6+
refresh: true,
7+
body: {
8+
query: {
9+
bool: {
10+
should: [
11+
{
12+
match: {
13+
message: {
14+
query: 'Japanese art',
15+
_name: 'query1'
16+
}
17+
}
18+
},
19+
{
20+
match: {
21+
message: {
22+
query: 'Holand culture',
23+
_name: 'query2'
24+
}
25+
}
26+
}
27+
]
28+
}
29+
}
30+
}
31+
)
32+
puts response
33+
----

docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc renamed to docs/examples/guide/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ response = client.search(
66
query: {
77
text_expansion: {
88
'ml.tokens' => {
9-
model_id: '.elser_model_1',
9+
model_id: '.elser_model_2',
1010
model_text: 'How is the weather in Jamaica?'
1111
}
1212
}
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+
----
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.connector_sync_job.list(
4+
from: 0,
5+
size: 2
6+
)
7+
puts response
8+
----
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[source, ruby]
2+
----
3+
response = client.connector.put(
4+
connector_id: 'my-connector',
5+
body: {
6+
index_name: 'search-google-drive',
7+
name: 'My Connector',
8+
service_type: 'google_drive'
9+
}
10+
)
11+
puts response
12+
----
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: 'openai-embeddings',
5+
body: {
6+
knn: {
7+
field: 'content_embedding',
8+
query_vector_builder: {
9+
text_embedding: {
10+
model_id: '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+
----
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+
----
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.check_in(
4+
connector_sync_job_id: 'my-connector-sync-job'
5+
)
6+
puts response
7+
----

docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
----
33
response = client.search(
44
index: 'books',
5-
body: { query: { match: { name: 'brave' } } }
5+
body: {
6+
query: {
7+
match: {
8+
name: 'brave'
9+
}
10+
}
11+
}
612
)
713
puts response
814
----
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.delete(
4+
connector_sync_job_id: 'my-connector-sync-job-id'
5+
)
6+
puts response
7+
----

0 commit comments

Comments
 (0)