Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 8.15.0 #2636

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions docs/examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc

This file was deleted.

4 changes: 2 additions & 2 deletions docs/examples/0db06c3cba57cf442ac7fab89966e1e1.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
resp = client.index(
index="my-index-000001",
id="1",
refresh=True,
refresh="true",
body={
"my_id": "1",
"text": "This is a question",
Expand All @@ -17,7 +17,7 @@ print(resp)
resp = client.index(
index="my-index-000001",
id="2",
refresh=True,
refresh="true",
body={
"my_id": "2",
"text": "This is another question",
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/0e5d25c7bb738c42d471020d678e2966.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ml/trained-models/apis/start-trained-model-deployment.asciidoc:173
// ml/trained-models/apis/start-trained-model-deployment.asciidoc:200

[source, python]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// mapping/types/numeric.asciidoc:275
// mapping/types/numeric.asciidoc:287

[source, python]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/10535507a9735fcf06600444b9067d4c.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// mapping/types/text.asciidoc:181
// mapping/types/text.asciidoc:184

[source, python]
----
Expand Down
18 changes: 0 additions & 18 deletions docs/examples/10c3fe2265bb34964bd1005f9da66773.asciidoc

This file was deleted.

4 changes: 2 additions & 2 deletions docs/examples/1233be1d4c9c7ca54126f1a0693b26de.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resp = client.index(
index="my-index-000001",
id="3",
routing="1",
refresh=True,
refresh="true",
body={
"my_id": "3",
"text": "This is an answer",
Expand All @@ -19,7 +19,7 @@ resp = client.index(
index="my-index-000001",
id="4",
routing="1",
refresh=True,
refresh="true",
body={
"my_id": "4",
"text": "This is another answer",
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/13ecdf99114098c76b050397d9c3d4e6.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// inference/post-inference.asciidoc:197
// inference/post-inference.asciidoc:201

[source, python]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/156bc64c94f9f3334fbce25165d2286a.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// index-modules/index-sorting.asciidoc:16
// index-modules/index-sorting.asciidoc:15

[source, python]
----
Expand Down
19 changes: 0 additions & 19 deletions docs/examples/197dc41c8df9629e145b3064c63b2ccc.asciidoc

This file was deleted.

19 changes: 19 additions & 0 deletions docs/examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// mapping/types/semantic-text.asciidoc:22

[source, python]
----
resp = client.indices.create(
index="my-index-000001",
body={
"mappings": {
"properties": {
"inference_field": {
"type": "semantic_text",
"inference_id": "my-elser-endpoint",
}
}
}
},
)
print(resp)
----
2 changes: 1 addition & 1 deletion docs/examples/1e0f203aced9344382081ab095c44dde.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// mapping/types/text.asciidoc:230
// mapping/types/text.asciidoc:233

[source, python]
----
Expand Down
27 changes: 27 additions & 0 deletions docs/examples/1fcc4a3280be399753dcfd5c489ff682.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// mapping/types/range.asciidoc:316

[source, python]
----
resp = client.indices.create(
index="idx",
body={
"mappings": {
"_source": {"mode": "synthetic"},
"properties": {"my_range": {"type": "ip_range"}},
}
},
)
print(resp)

resp = client.index(
index="idx",
id="1",
body={
"my_range": [
"10.0.0.0/24",
{"gte": "10.0.0.0", "lte": "10.0.0.255"},
]
},
)
print(resp)
----
2 changes: 1 addition & 1 deletion docs/examples/2646710ece0c4c843aebeacd370d0396.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// mapping/types/dense-vector.asciidoc:126
// mapping/types/dense-vector.asciidoc:137

[source, python]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/2826510e4aeb1c0d8dc43d317ed7624a.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// mapping/types/boolean.asciidoc:242
// mapping/types/boolean.asciidoc:249

[source, python]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/2932e6f71e247cf52e11d2f38f114ddf.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
----
resp = client.reindex(
slices="5",
refresh=True,
refresh="true",
body={
"source": {"index": "my-index-000001"},
"dest": {"index": "my-new-index-000001"},
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/2c090fe7ec7b66b3f5c178d71c46323b.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
----
resp = client.indices.stats(
metric="fielddata",
human=True,
human="true",
fields="my_join_field",
)
print(resp)

resp = client.nodes.stats(
metric="indices",
index_metric="fielddata",
human=True,
human="true",
fields="my_join_field",
)
print(resp)
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ print(resp)

resp = client.index(
index="test",
refresh=True,
refresh="true",
body={"text": "words words", "flag": "bar"},
)
print(resp)

resp = client.index(
index="test",
refresh=True,
refresh="true",
body={"text": "words words", "flag": "foo"},
)
print(resp)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/3541d4a85e27b2c3896a7a7ee98b4b37.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// health/health.asciidoc:478
// health/health.asciidoc:481

[source, python]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/36063ff9a318dba7bb0be3a230655dc8.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// mapping/types/numeric.asciidoc:247
// mapping/types/numeric.asciidoc:259

[source, python]
----
Expand Down
10 changes: 0 additions & 10 deletions docs/examples/36b86b97feedcf5632824eefc251d6ed.asciidoc

This file was deleted.

20 changes: 20 additions & 0 deletions docs/examples/36d229f734adcdab00be266a7ce038b1.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// mapping/types/dense-vector.asciidoc:375

[source, python]
----
resp = client.indices.create(
index="my-bit-vectors",
body={
"mappings": {
"properties": {
"my_vector": {
"type": "dense_vector",
"dims": 40,
"element_type": "bit",
}
}
}
},
)
print(resp)
----
2 changes: 1 addition & 1 deletion docs/examples/36da9668fef56910370f16bfb772cc40.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
----
resp = client.indices.stats(
metric="request_cache",
human=True,
human="true",
)
print(resp)
----
18 changes: 18 additions & 0 deletions docs/examples/38ba93890494bfa7beece58dffa44f98.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// mapping/types/semantic-text.asciidoc:177

[source, python]
----
resp = client.bulk(
index="test-index",
body=[
{"update": {"_id": "1"}},
{
"doc": {
"infer_field": "updated inference field",
"source_field": "updated source field",
}
},
],
)
print(resp)
----
2 changes: 1 addition & 1 deletion docs/examples/39ce44333d28ed2b833722d3e3cb06f3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[source, python]
----
resp = client.search(
include_named_queries_score=True,
include_named_queries_score="true",
body={
"query": {
"bool": {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/3eb4cdd4a799a117ac1ff5f02b18a512.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ print(resp)
resp = client.index(
index="queries",
id="1",
refresh=True,
refresh="true",
body={"query": {"match": {"body": "quick brown fox"}}},
)
print(resp)
Expand Down
10 changes: 0 additions & 10 deletions docs/examples/3f3b3e207f79303ce6f86e03e928e062.asciidoc

This file was deleted.

2 changes: 1 addition & 1 deletion docs/examples/4955bae30f265b9e436f82b015de6d7e.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
----
resp = client.search(
index="my-index-000001",
pretty=True,
pretty="true",
body={
"query": {
"terms": {
Expand Down
17 changes: 17 additions & 0 deletions docs/examples/4982c547be1ad9455ae836990aea92c5.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ml/trained-models/apis/start-trained-model-deployment.asciidoc:222

[source, python]
----
resp = client.ml.start_trained_model_deployment(
model_id="my_model",
deployment_id="my_model_for_search",
body={
"adaptive_allocations": {
"enabled": True,
"min_number_of_allocations": 3,
"max_number_of_allocations": 10,
}
},
)
print(resp)
----
20 changes: 20 additions & 0 deletions docs/examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// mapping/types/dense-vector.asciidoc:469

[source, python]
----
resp = client.indices.create(
index="my-index-000001",
body={
"mappings": {
"properties": {
"text_embedding": {
"type": "dense_vector",
"dims": 384,
"index_options": {"type": "flat"},
}
}
}
},
)
print(resp)
----
Loading
Loading