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

Updates USER_GUIDE.md and /_samples/ #518

Merged
merged 5 commits into from
Apr 10, 2024

Conversation

mstephenson6
Copy link
Contributor

Description

Cleans up example code so it runs and shows a complete cycle of index creation, document indexing, searching, document deletion, and index deletion.

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.

mstephenson6 added a commit to mstephenson6/opensearch-go that referenced this pull request Apr 8, 2024
mstephenson6 added a commit to mstephenson6/opensearch-go that referenced this pull request Apr 8, 2024
Signed-off-by: Matt Stephenson <mstephenson6@users.noreply.github.com>
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Thanks!

I believe this matches what we have in https://github.com/opensearch-project/opensearch-go/tree/main/_samples, so that should be updated as well, and made sure to run. Rebase please, too.

mstephenson6 added a commit to mstephenson6/opensearch-go that referenced this pull request Apr 8, 2024
Signed-off-by: Matt Stephenson <mstephenson6@users.noreply.github.com>
@mstephenson6
Copy link
Contributor Author

mstephenson6 commented Apr 8, 2024

Thanks!

I believe this matches what we have in https://github.com/opensearch-project/opensearch-go/tree/main/_samples, so that should be updated as well, and made sure to run. Rebase please, too.

@dblock - Yeah, I think the files in /_samples need attention for login at least, NewDefaultClient() might not work at all with the v2.13 strong password requirement? I'll line them up with the USER_GUIDE.md change.

@mstephenson6 mstephenson6 requested a review from dblock April 9, 2024 16:35
- Clean up misc build errors and statticcheck warnings
- Index() call forces refresh, so the next search hit is reliable with 2 nodes
- Restore and clean up the document delete step
- Add some print statements about the search and delete steps

Signed-off-by: Matt Stephenson <mstephenson6@users.noreply.github.com>
Signed-off-by: Matt Stephenson <mstephenson6@users.noreply.github.com>
Signed-off-by: Matt Stephenson <mstephenson6@users.noreply.github.com>
Signed-off-by: Matt Stephenson <mstephenson6@users.noreply.github.com>
Signed-off-by: Matt Stephenson <mstephenson6@users.noreply.github.com>
@mstephenson6 mstephenson6 changed the title Update example code in USER_GUIDE.md Updates USER_GUIDE.md and /_samples/ Apr 10, 2024
@mstephenson6
Copy link
Contributor Author

@dblock - this is cleaned up and ready for review. Thanks for pointing out the other samples. I updated all of them to work with the default strong password in v2.13, and the error-handling code in USER_GUIDE.md now uses opensearch.Error from its new package on main.

@dblock dblock merged commit 8248adf into opensearch-project:main Apr 10, 2024
53 checks passed
@dblock
Copy link
Member

dblock commented Apr 10, 2024

TY!

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.

None yet

2 participants