ElasticSearch

elastic.co/guide

RESTful (PUT, GET, POST, DELETE) API equivalent to CRUD API (Create, Retrieve, Update, Delete)

curl -XVERB 'PROTOCOL://HOST:PORT/PATH?QUERY_STRING' -d 'BODY'

VERB: PUT, GET, POST, and DELETE
POST vs PUT – POST append and PUT replaces.

Create – POST:

# curl -XPOST http://localhost:9200/Index_Name -d '{"name": "Jack", "skills": "nada"}'

Retrieve – GET:

# curl -XGET http://localhost:9200/Index_Name?pretty

Update – PUT(whole) / POST (partial):

# curl -XPUT http://localhost:9200/Index_Name

Delete:

# curl -XDELETE  http://localhost:9200/Index_Name

Index – Logical namespace which points to one or more shards in an ElasticSearch cluster and serves as the place to store related data.

Type – Within an index, you can define one or more types. A type is a logical category/partition of your index.

Document – Within a Type, a Document is a basic unit of information that can be indexed. For example, you can have a document for a single customer, another document for a single product, and yet another for a single order. This document is expressed in JSON format.