In Elasticsearch there are two vital operations: index and search.
Indexing means storing one or more documents in an index: a similar concept of inserting records in a relational database.
In Lucene, the core engine of Elasticsearch, inserting or updating a document has the same cost: in Lucene and Elasticsearch update means replace.
You need an up-and-running Elasticsearch installation, as used in the Downloading and installing Elasticsearch recipe in Chapter 2, Downloading and Setup.
curl via the command line, you need to install
curl for your operative system.
To correctly execute the following commands, use the index and mapping created in the Putting a mapping in an index recipe.
To index ...