Added API guide for document lifecycle. #395
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.