Notes for learning Elasticsearch
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
DSL
Docker
aggregations
cluster
document
highlighting
shards
.gitignore
LICENSE
README.md

README.md

Learn Elasticsearch

Learn how to use Elasticsearch.

Example code is listed in alphabetical order, which is different to what Elasticsearch will return.

Disclaimer

These notes have been created while I am learning Elasticsearch. They will probably change as I learn more. This is not a tutorial by an Elasticsearch expert.

You have been warned!

CRUD

Create, read, update and delete documents.

Search

GET /my_index/my_document_type/_search

Returns:

{
	"_shards": {},
	"hits": {
		"hits": [
			{
				"_id": "1",
				"_index": "my_index",
				"_score": 1,
				"_source": {
					"email": "matt@example.com",
					"name": "Matt"
				},
				"_type": "my_document_type",
				"_version": 1,
				"found": true
			}
		],
		"max_score": 1,
		"total": 1
	},
	"timed_out": false,
	"took": 6
}
GET /my_index/my_document_type/_search?q=name:Matt