Advanced elasticsearch

Chinese version, es2.x version: https://www.elastic.co/guide/cn/elasticsearch/guide/cn/index.html

The English version 6.x data api: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-metrics-avg-aggregation.html

 

First, the establishment of the principle of mapping :

(1) Do not use es the default mapping, though easy but unreasonable
(2) field types to streamline as much as possible, because as long as we build the field es will create an inverted index, retrieve will be loaded into memory. If unreasonable cause memory explosion.
(3) Do not retrieve some fields do not set the index: true, when es default true, in fact, recommend the use of more es + mysql (or hbase) and other forms of unwanted es stored on other storage media field by es to uniquely identify and establish mapping.
(4) Ik word in the establishment to pay attention to: build an index using ik_max_word retrieval using ik_smart;

 

Guess you like

Origin www.cnblogs.com/yufeng218/p/12158969.html