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

Adds bulk operations to Go client. Refactors Go client. #1038

Merged
merged 2 commits into from
Sep 6, 2022

Conversation

kolchfa-aws
Copy link
Collaborator

Fixes #507

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

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

@kolchfa-aws kolchfa-aws added 3 - Tech review PR: Tech review in progress backport 1.3 PR: Backport label for v1.3.x backport 2.0 PR: Backport label for v2.0.x clients Documentation related to Clients 4 - Doc review PR: Doc review in progress backport 2.1 PR: Backport label for 2.1 labels Aug 30, 2022
@kolchfa-aws kolchfa-aws added this to the 2022-Q3 milestone Aug 30, 2022
@kolchfa-aws kolchfa-aws self-assigned this Aug 30, 2022
@kolchfa-aws kolchfa-aws requested a review from a team as a code owner August 30, 2022 19:10
@kolchfa-aws
Copy link
Collaborator Author

@VijayanB This is the new PR for the Go client. It includes bulk operations. Could you please take a quick look when you get a chance? Thanks.

Copy link
Contributor

@alicejw1 alicejw1 left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link

@JeffHuss JeffHuss left a comment

Choose a reason for hiding this comment

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

Great work! LGTM!

@kolchfa-aws kolchfa-aws added 5 - Editorial review PR: Editorial review in progress and removed 3 - Tech review PR: Tech review in progress 4 - Doc review PR: Doc review in progress labels Sep 2, 2022
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@kolchfa-aws Please see my comments and let me know if you have any questions. Thanks!

_clients/go.md Outdated
@@ -11,21 +11,171 @@ The OpenSearch Go client lets you connect your Go application with the data in y

## Setup

If you're creating a new project:
If you're starting a new project, create a new module by running:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make this a complete sentence (maybe just add "the following")?

_clients/go.md Outdated
})
```

The Go client retries requests for a maximum of three times by default. To customize the number of retries, set the `MaxRetries` parameter. Additionally, you can change the list of response codes for which a request is retried by setting the `RetryOnStatus` parameter.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the last sentence end in a colon?

_clients/go.md Outdated

## Sample program

This sample program creates a client, adds an index with non-default settings, inserts a document, performs bulk operations, searches for the document, deletes the document, and finally deletes the index:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Either delete "finally" or place commas around it ("...and, finally, deletes...").

_clients/go.md Outdated

## Sample code
To connect to the default OpenSearch host, create a client object as follows:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Global: Instead of "as follows", which could be a bit ambiguous, can we rephrase these introductory sentences to be a little more clear? Something like "...create a client object by running the following code" or "...use the following to create...". Please apply to all instances of "as follows".

@natebower natebower removed the 5 - Editorial review PR: Editorial review in progress label Sep 6, 2022
Signed-off-by: Fanit Kolchina <[email protected]>
@kolchfa-aws kolchfa-aws merged commit 441df4c into main Sep 6, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 6, 2022
* Adds bulk operations to Go client. Refactors Go client.

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
(cherry picked from commit 441df4c)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 6, 2022
* Adds bulk operations to Go client. Refactors Go client.

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
(cherry picked from commit 441df4c)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 6, 2022
* Adds bulk operations to Go client. Refactors Go client.

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
(cherry picked from commit 441df4c)
kolchfa-aws added a commit that referenced this pull request Sep 6, 2022
* Adds bulk operations to Go client. Refactors Go client.

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
(cherry picked from commit 441df4c)

Co-authored-by: kolchfa-aws <[email protected]>
kolchfa-aws added a commit that referenced this pull request Sep 6, 2022
* Adds bulk operations to Go client. Refactors Go client.

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
(cherry picked from commit 441df4c)

Co-authored-by: kolchfa-aws <[email protected]>
ariamarble pushed a commit that referenced this pull request Sep 6, 2022
* Adds bulk operations to Go client. Refactors Go client.

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
(cherry picked from commit 441df4c)

Co-authored-by: kolchfa-aws <[email protected]>
@kolchfa-aws kolchfa-aws added the backport 2.2 PR: Backport label for 2.2 label Sep 12, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 12, 2022
* Adds bulk operations to Go client. Refactors Go client.

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
(cherry picked from commit 441df4c)
kolchfa-aws added a commit that referenced this pull request Sep 12, 2022
* Adds bulk operations to Go client. Refactors Go client.

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
(cherry picked from commit 441df4c)

Co-authored-by: kolchfa-aws <[email protected]>
@Naarcha-AWS Naarcha-AWS deleted the Fix507-go-client branch September 14, 2022 17:50
Naarcha-AWS pushed a commit that referenced this pull request Oct 6, 2022
* Adds bulk operations to Go client. Refactors Go client.

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.3 PR: Backport label for v1.3.x backport 2.0 PR: Backport label for v2.0.x backport 2.1 PR: Backport label for 2.1 backport 2.2 PR: Backport label for 2.2 clients Documentation related to Clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add example for Bulk API
4 participants