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

Update performance.md - Remove old curl commands #8761

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

landon-lengyel
Copy link
Contributor

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

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Updating old curl examples to current standard across the rest of the documentation.

Signed-off-by: Landon Lengyel <landon@almonde.org>
Copy link

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.

Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
```
{% 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PUT {index}/_settings
PUT /<index>/_settings

{
"translog.flush_threshold_size" : "1024MB"
}
}
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
```
{% 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
```
{% 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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"} }
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
```
{% include copy-curl.html %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants