-
Notifications
You must be signed in to change notification settings - Fork 493
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
Update performance.md - Remove old curl commands #8761
base: main
Are you sure you want to change the base?
Conversation
Updating old curl examples to current standard across the rest of the documentation. Signed-off-by: Landon Lengyel <landon@almonde.org>
Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged. Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer. When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @landon-lengyel! A couple of suggestions. The copy-curl include adds both copy and copy as curl buttons to the request.
@@ -32,12 +32,8 @@ An increased `index.translog.flush_threshold_size` can also increase the time th | |||
Before increasing `index.translog.flush_threshold_size`, call the following API operation to get current flush operation statistics: | |||
|
|||
```json | |||
curl -XPOST "os-endpoint/index-name/_stats/flush?pretty" | |||
GET {index}/_stats/flush?pretty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GET {index}/_stats/flush?pretty | |
GET /<index>/_stats/flush?pretty |
@@ -32,12 +32,8 @@ An increased `index.translog.flush_threshold_size` can also increase the time th | |||
Before increasing `index.translog.flush_threshold_size`, call the following API operation to get current flush operation statistics: | |||
|
|||
```json | |||
curl -XPOST "os-endpoint/index-name/_stats/flush?pretty" | |||
GET {index}/_stats/flush?pretty | |||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
``` | |
{% include copy-curl.html %} |
@@ -53,9 +49,14 @@ In the output, note the number of flushes and the total time. The following exam | |||
To increase the flush threshold size, call the following API operation: | |||
|
|||
```json | |||
curl -XPUT "os-endpoint/index-name/_settings?pretty" -d "{"index":{"translog.flush_threshold_size" : "1024MB"}}" | |||
PUT {index}/_settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PUT {index}/_settings | |
PUT /<index>/_settings |
{ | ||
"translog.flush_threshold_size" : "1024MB" | ||
} | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
``` | |
{% include copy-curl.html %} |
@@ -65,9 +66,8 @@ Choose the appropriate threshold size for your cluster. | |||
Run the stats API operation again to see whether the flush activity changed: | |||
|
|||
```json | |||
curl -XGET "os-endpoint/index-name/_stats/flush?pretty" | |||
GET {index}/_stats/flush?pretty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GET {index}/_stats/flush?pretty | |
GET /<index>/_stats/flush |
@@ -65,9 +66,8 @@ Choose the appropriate threshold size for your cluster. | |||
Run the stats API operation again to see whether the flush activity changed: | |||
|
|||
```json | |||
curl -XGET "os-endpoint/index-name/_stats/flush?pretty" | |||
GET {index}/_stats/flush?pretty | |||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
``` | |
{% include copy-curl.html %} |
@@ -127,14 +127,13 @@ To reduce the size of the OpenSearch response, use the `filter_path` parameter t | |||
In the following example, the `index-name`, `type-name`, and `took` fields are excluded from the response: | |||
|
|||
```json | |||
curl -XPOST "es-endpoint/index-name/type-name/_bulk?pretty&filter_path=-took,-items.index._index,-items.index._type" -H 'Content-Type: application/json' -d' | |||
POST _bulk?pretty&filter_path=-took,-items.index._index,-items.index._type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
POST _bulk?pretty&filter_path=-took,-items.index._index,-items.index._type | |
POST /_bulk?pretty&filter_path=-took,-items.index._index,-items.index._type |
@@ -127,14 +127,13 @@ To reduce the size of the OpenSearch response, use the `filter_path` parameter t | |||
In the following example, the `index-name`, `type-name`, and `took` fields are excluded from the response: | |||
|
|||
```json | |||
curl -XPOST "es-endpoint/index-name/type-name/_bulk?pretty&filter_path=-took,-items.index._index,-items.index._type" -H 'Content-Type: application/json' -d' | |||
POST _bulk?pretty&filter_path=-took,-items.index._index,-items.index._type | |||
{ "index" : { "_index" : "test2", "_id" : "1" } } | |||
{ "user" : "testuser" } | |||
{ "update" : {"_id" : "1", "_index" : "test2"} } | |||
{ "doc" : {"user" : "example"} } | |||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
``` | |
{% include copy-curl.html %} |
Description
This document uses curl for all of it's examples, while the rest of the documentation has shifted towards the "Dev Console" style of example.
This PR updates the document updates that.
Issues Resolved
N/A
Version
all
Frontend features
N/A
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.