anchor.diff:  }'
   --------------------------------------------------
   
  -Dissecting the above, the bool query contains a `match_all` query (the query part) and a `range` query (the filter part). We can substitute any other queries into the query and the filter parts. In the above case, the range query makes perfect sense since documents falling into the range all match "equally", i.e., no document is more relevant than another.
  -
  -In addition to the `match_all`, `match`, `bool`, and `range` queries, there are a lot of other query types that are available and we won't go into them here. Since we already have a basic understanding of how they work, it shouldn't be too difficult to apply this knowledge in learning and experimenting with the other query types.
  -
  -=== Executing Aggregations
  -
  -Aggregations provide the ability to group and extract statistics from your data. The easiest way to think about aggregations is by roughly equating it to the SQL GROUP BY and the SQL aggregate functions. In Elasticsearch, you have the ability to execute searches returning hits and at the same time return aggregated results separate from the hits all in one response. This is very powerful and efficient in the sense that you can run queries and multiple aggregations and get the results back of both (or either) operations in one shot avoiding network roundtrips using a concise and simplified API.
  -
  -To start with, this example groups all the accounts by state, and then returns the top 10 (default) states sorted by count descending (also default):
  +Dissecting the above, the bool query contains a `match_all` query (the query part) and a `range` query (the filter part).
  +We can substitute any other queries into the query and the filter parts. In the above case, the range query makes perfect sense since documents falling into the range all match "equally", i.e., no document is more relevant than another.
  +
  +除了`match_all`, `match`, `bool` 以及 `range` 查询以外, there are a lot of other query types that are available and we won't go into them here. Since we already have a basic understanding of how they work, it shouldn't be too difficult to apply this knowledge in learning and experimenting with the other query types.
  +
  +=== 执行聚合
  +
  +Aggregations provide the ability to group and extract statistics from your data. The easiest way to think about
  +aggregations is by roughly equating it to the SQL GROUP BY and the SQL aggregate functions. In Elasticsearch,
  +you have the ability to execute searches returning hits and at the same time return aggregated results separate
  +from the hits all in one response. This is very powerful and efficient in the sense that you can run queries
  +and multiple aggregations and get the results back of both (or either) operations in one shot avoiding network
  +roundtrips using a concise and simplified API.
  +
  +To start with, this example groups all the accounts by state, and then returns the top 10 (default) states sorted
  +by count descending (also default):
   
   [source,sh]
   --------------------------------------------------
  
positive.code: yellow bank    5   1       1000            0    424.4kb        424.4kb
  --------------------------------------------------
  
  Which means that we just successfully bulk indexed 1000 documents into the bank index (under the account type).
  
  === The Search API
  
  Now let's start with some simple searches. There are two basic ways to run searches: one is by sending search parameters through the <<search-uri-request,REST request URI>> and the other by sending them through the <<search-request-body,REST request body>>. The request body method allows you to be more expressive and also to define your searches in a more readable JSON format. We'll try one example of the request URI method but for the remainder of this tutorial, we will exclusively be using the request body method.
  
  The REST API for search is accessible from the `_search` endpoint. This example returns all documents in the bank index:
  
  [source,sh]
  --------------------------------------------------
  curl 'localhost:9200/bank/_search?q=*&pretty'
  --------------------------------------------------
  
  Let's first dissect the search call. We are searching (`_search` endpoint) in the bank index, and the `q=*` parameter instructs Elasticsearch to match all documents in the index. The `pretty` parameter, again, just tells Elasticsearch to return pretty-printed JSON results.
  
  And the response (partially shown):
  
  [source,sh]
  --------------------------------------------------
  
negative.code: }'
  --------------------------------------------------
  
  下面的示例返回地址中包含术语 "mill" 或 "lane" 的所有账户:
  
  [source,sh]
  --------------------------------------------------
  