The native APIs for managing documents (index, delete, and update) are the most important after the search APIs. In this recipe, we will learn how to use them. In the next recipe, we will proceed to bulk actions to improve performance.
Managing documents
Getting ready
You need an up-and-running Elasticsearch installation, which we described how to get in the Downloading and installing Elasticsearch recipe in Chapter 1, Getting Started.
A Maven tool, or an IDE that natively supports it for Java programming such as Eclipse or IntelliJ IDEA, must be installed.
The code for this recipe is in the ch13/high-level-client directory and the referred class is DocumentOperations.