Main notions compare to SQL

Compare Elasticsearch with SQL
"id": 1,
"name": "Ironman",
"age": 32
"id": 2,
"name": "Captain america",
"age": 27
"id": 1,
"name": "Spiderman",
"age": 16
"id": 1,
"name": "Wolverine",
"age": 36


Elasticsearch main APIs

Document CRUD Api

PUT / Inserting / Indexing a new document

Add first hero to ES

GET document

Try to find document which does not exist
Get only data of document instead of all reposnse
Check that a document exists

PUT / Update / Reindexing document

Reindexing a document
Reindexing only one field of document


Delete a TYPE

Delete an INDEX

Index heroes information
Response : delete of index

Search Api

Simple search request
GET heroes/hero/_search?q=name:Spiderman
GET heroes/_search
“query”: {
“match_all”: {}

Thank you for your attention

Senior web developer, architect, cryptocurrencies trader,

Get the Medium app