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

Added API guide for document lifecycle. #395

Conversation

Djcarrillo6
Copy link
Contributor

Description

This PR provides add the API guide on using OpenSearch.NET client to implement document lifecycle API(s).

  • Setup: Guide on setting up a local OpenSearch client instance and creating an index named movies with properties such as director, title, and year.

  • Create a new document with specified ID: Details on how to use 'Create' or 'Index' API actions to establish new documents with preset IDs. Explains the difference regarding idempotency - 'Create' is not idempotent while 'Index' is.

  • Create a new document with auto-generated ID: Instructions on using the 'Index' action to generate new documents with auto-generated IDs.

  • Get a document: Tutorial on how to use the 'Get' API action to retrieve a document from the index, including how to specify which fields to include or exclude.

  • Get multiple documents: Guide on using the 'MultiGet' API action to retrieve multiple documents from the index simultaneously.

  • Check if a document exists: Provides the DocumentExists API usage to verify the existence of a document in the index.

  • Update a document: Describes how to use the 'Update' API action to modify a document's details and differentiates between 'Update' (partial modification) and 'Index' (complete overwrite).

  • Update multiple documents by query: Step-by-step instruction on how to update multiple documents simultaneously using the 'UpdateByQuery' API action based on a defined query.

  • Delete a document: Details on how to delete a document using the 'Delete' API action.

  • Delete multiple documents by query: Description on how to delete multiple documents at once using the 'DeleteByQuery' API action based on a defined query.

  • Cleanup: Instructions on deleting the movies index to clean up the resources made throughout the guide.

Issues Resolved

Resolves issue #188

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.

guides/document_lifecycle.md Outdated Show resolved Hide resolved
guides/document_lifecycle.md Outdated Show resolved Hide resolved
guides/document_lifecycle.md Outdated Show resolved Hide resolved
guides/document_lifecycle.md Outdated Show resolved Hide resolved
guides/document_lifecycle.md Outdated Show resolved Hide resolved
guides/document_lifecycle.md Outdated Show resolved Hide resolved
guides/document_lifecycle.md Outdated Show resolved Hide resolved
guides/document_lifecycle.md Outdated Show resolved Hide resolved
guides/document_lifecycle.md Outdated Show resolved Hide resolved
guides/document_lifecycle.md Outdated Show resolved Hide resolved
Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>

Added Movie class code to guide setup example.

Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>

Added requested changes from PR review.

Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>
@Djcarrillo6 Djcarrillo6 force-pushed the fix/issue#188/guides-document-lifecycle branch from f9ffce8 to 9b96057 Compare October 27, 2023 20:38
@Xtansia Xtansia merged commit f935d28 into opensearch-project:main Oct 29, 2023
34 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants