-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix example generation * Stop using mktemp It is insecure, though not in this specific context, but tools are flagging this.
- Loading branch information
Showing
450 changed files
with
1,946 additions
and
2,437 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// aggregations/bucket/filter-aggregation.asciidoc:58 | ||
|
||
[source, python] | ||
---- | ||
resp = client.search( | ||
index="sales", | ||
size="0", | ||
filter_path="aggregations", | ||
body={ | ||
"query": {"term": {"type": "t-shirt"}}, | ||
"aggs": {"avg_price": {"avg": {"field": "price"}}}, | ||
}, | ||
) | ||
print(resp) | ||
---- |
4 changes: 2 additions & 2 deletions
4
...0bbd30b9be3e54ff3028b9f4459634d2.asciidoc → ...0246f73cc2ed3dfec577119e8cd15404.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...98b121bf47cebd85671a2cb519688d28.asciidoc → ...0264e994a7e68561e2ca6be0f0d90ee9.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// docs/get.asciidoc:79 | ||
|
||
[source, python] | ||
---- | ||
resp = client.get( | ||
index="my-index-000001", | ||
id="0", | ||
_source="*.id", | ||
) | ||
print(resp) | ||
---- |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// query-dsl/multi-match-query.asciidoc:341 | ||
// query-dsl/multi-match-query.asciidoc:344 | ||
|
||
[source, python] | ||
---- | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
// cluster/health.asciidoc:35 | ||
// cluster/health.asciidoc:42 | ||
|
||
[source, python] | ||
---- | ||
resp = client.cluster.health(wait_for_status="yellow", timeout="50s") | ||
resp = client.cluster.health( | ||
wait_for_status="yellow", | ||
timeout="50s", | ||
) | ||
print(resp) | ||
---- |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
...1bc731a4df952228af6dfa6b48627332.asciidoc → ...07ba3eaa931f2cf110052e3544db51f8.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...09ecba5814d71e4c44468575eada9878.asciidoc → ...095d60b2cfc5004c97efc49f27287262.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// docs/delete.asciidoc:82 | ||
|
||
[source, python] | ||
---- | ||
resp = client.delete( | ||
index="my-index-000001", | ||
id="1", | ||
routing="shard-1", | ||
) | ||
print(resp) | ||
---- |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// query-dsl/multi-match-query.asciidoc:259 | ||
// query-dsl/multi-match-query.asciidoc:262 | ||
|
||
[source, python] | ||
---- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// aggregations/bucket/filter-aggregation.asciidoc:167 | ||
|
||
[source, python] | ||
---- | ||
resp = client.search( | ||
index="sales", | ||
size="0", | ||
filter_path="aggregations", | ||
body={ | ||
"aggs": { | ||
"hats": { | ||
"filter": {"term": {"type": "hat"}}, | ||
"aggs": {"avg_price": {"avg": {"field": "price"}}}, | ||
}, | ||
"t_shirts": { | ||
"filter": {"term": {"type": "t-shirt"}}, | ||
"aggs": {"avg_price": {"avg": {"field": "price"}}}, | ||
}, | ||
} | ||
}, | ||
) | ||
print(resp) | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// mapping/types/numeric.asciidoc:275 | ||
|
||
[source, python] | ||
---- | ||
resp = client.indices.create( | ||
index="idx", | ||
body={ | ||
"mappings": { | ||
"_source": {"mode": "synthetic"}, | ||
"properties": { | ||
"f": {"type": "scaled_float", "scaling_factor": 0.01} | ||
}, | ||
} | ||
}, | ||
) | ||
print(resp) | ||
resp = client.index( | ||
index="idx", | ||
id="1", | ||
body={"f": 123}, | ||
) | ||
print(resp) | ||
---- |
Oops, something went wrong.