The following ES are based on version (V2.3.4)
The default of ES
1. Default automatically sends all cluster nodes of the same LAN first
2. The default one index library will have 5 shards (the more shards, the better the efficiency)
Because of these two defaults, the Shard pairs of the Unified Index library are distributed on different machines, and the API search has this problem
Search Type of ES
1. Why do you have this thing?
, these two problems occur:
The difference between and and then: if
2. Workaround
ES defines four types of search:
Query_then_fetch: Default search Type, 50 values sorted, the amount of data returned, but there is inaccurate behavior
Query_and_fetch: Direct return of 50 (fast, accurate)
Dfs_query_then_fetch: First collect all the document rate and the word rate, and then return from the returned 50 data, sorted by the first ten ID, in the query
Dfs_query_and_fetch: First collect all the document rate and the word rate, and then return 50 data from the returned
The above two kinds of search methods to sort the reference is not the same, the following two first unified reference, search again
Then and and the difference is: then is the return data volume pair but slow, and the amount of data, but fast
DFS will first do such a synchronous reference process, more such a process affects the efficiency of the query, in the production process of trade-offs have developed this self-determined.
The search type of Enterprise Big Data Elasticsearch