This guide provides Java SDK examples and instructions for the core features of OpenSearch. It covers data push and search applications to help developers understand the end-to-end workflow.
Document push demos and logs
-
Commit push demo: This demo shows how to use the `commit` method. Document data is dynamically encapsulated into Map objects and added to a cache using the `add` method. The `commit` method is then called to submit the documents in a batch.
-
Push demo: This demo shows how to use the `push` method to submit data. A dataset is generated in the specified format, and then the `push` method is called to send the entire dataset to the application in a single batch.
-
SDK log output: This guide describes how to configure logs for the Java SDK.
Search demos
-
Search demo: This demo describes how to configure environment variables and provides sample code for searching documents using the Java SDK.
-
Scroll query demo: The `search` method can retrieve a maximum of 5,000 results. This demo shows how to use the `scroll` method to export all data.
-
Iterative scroll query demo: This demo shows how to continuously retrieve paged results using a cursor to optimize deep paging performance.
-
Using algorithm module parameters: This demo explains how to use advanced parameters, such as BM25 weight adjustment and semantic retrieval threshold settings, to improve the relevance of search results.