color primary #36264b
color secondary #0feda1
Londra'da yaşayan Shay Banon kendine bir iş bakarken eşi ise Cordon Bleu'da bir aşçılık kursuna devam etmektedir. Shay boş vakitlerinde, eşinin gittikçe büyüyen tarif listesi için bir search engine yapmaya başlıyor. İlk iterasyonu Compass adı ile başlayıp, ikinci iterasyonda Elasticsearch (Apache Lucene tabanlı) adını alıyor.
A document has a few important properties in Elasticsearch
A value of a field can be simple, like the value of the location field can be a string. It can also contain other fields and values. For example, the location field might contain both a city and a street address within it.
For example, not all events need description values, so that field can be omitted altogether. But it might require new fields, such as the latitude and longitude of the location.
A document is normally a JSON representation of your data. As we discussed in chapter 1, JSON over HTTP is the most widely used way to communicate with Elasticsearch
Documents in Elasticsearch are said to be schema-free, in the sense that not all your documents need to have the same fields, so they’re not bound to the same schema.
Although you can add or omit fields at will, the type of each field matters: some are strings, some are integers, and so on. Because of that, Elasticsearch keeps a mapping of all your fields and their types and other settings. This mapping is specific to every type of every index.
You saw in chapter 1 that an index can be made up of one or more chunks called shards. This is good for scalability: you can run Elasticsearch on multiple servers and have shards of the same index live on all of them. Next, we’ll take a closer look at how sharding works in Elasticsearch.
- Once it’s defined, the warmer will make Elasticsearch run the query with every refresh operation. This will slow down the refresh, but the user queries will always run on “warm” caches.
If Elasticsearch doesn’t have enough heap to finish an operation, it throws an out-ofmemory exception that effectively makes the node crash and fall out of the cluster
Caching, A heap size of more than 32 GB will automatically make pointers uncompressed and waste memory.