project/es/es.html

19 lines
26 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head>
<title>Evernote Export</title>
<basefont face="微软雅黑" size="2" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="exporter-version" content="YXBJ Windows/603461 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;"/>
<style>
body, td {
font-family: ;
font-size: 10pt;
}
</style>
</head>
<body>
<a name="604"/>
<div>
<span><div><br/></div><div style="box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.15);-en-codeblock:true;"><div>https://www.elastic.co/cn/downloads/elasticsearch<br/></div></div><div><img src="es_files/Image.png" type="image/png" data-filename="Image.png"/></div><div><img src="es_files/Image [1].png" type="image/png" data-filename="Image.png"/></div><div>是否安装成功:<a href="http://localhost:9200/_cat/health?v=true">http://localhost:9200</a></div><div>健康检查:<a href="http://localhost:9200/_cat/health?v=true">http://localhost:9200/_cat/health?v=true</a></div><div>jvm状态<a href="http://localhost:9200/_nodes/stats/jvm">http://localhost:9200/_nodes/stats/jvm</a></div><div>添加内容:</div><div>curl -X PUT &quot;<a href="http://localhost:9200/_nodes/stats/jvm">http:</a>//localhost:9200/customer/_doc/1?pretty&quot; -H 'Content-Type: application/json' -d' {&quot;name&quot;: &quot;赵莉贤&quot;}'</div><div><img src="es_files/Image [2].png" type="image/png" data-filename="Image.png"/></div><div>查找:</div><div>curl -X GET &quot;localhost:9200/customer/_doc/1?pretty&quot;</div><div><img src="es_files/Image [3].png" type="image/png" data-filename="Image.png"/></div><div><span style="font-size: unset;"><br/></span></div><div><span style="font-size: unset; color: unset; font-family: unset;">测试:</span></div><div><span style="font-size: unset; color: unset; font-family: unset;">下载官网数据:</span>wget <a href="https://raw.githubusercontent.com/elastic/elasticsearch/master/docs/src/test/resources/accounts.json">https://raw.githubusercontent.com/elastic/elasticsearch/master/docs/src/test/resources/accounts.json</a></div><div>批量上传数据curl -H &quot;Content-Type: application/json&quot; -X POST &quot;localhost:9200/bank/_bulk?pretty&amp;refresh&quot; --data-binary &quot;@accounts.json&quot;</div><div>查看数据curl &quot;localhost:9200/_cat/indices?v=true&quot;<img src="es_files/Image [4].png" type="image/png" data-filename="Image.png"/></div><div><span style="font-size: 12pt; font-family: Consolas;">按顺序查找:</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200/bank/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;query&quot;: { &quot;match_all&quot;: {} },</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;sort&quot;: [</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    { &quot;account_number&quot;: &quot;asc&quot; }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  ]</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X POST </span><span style="font-size: 12pt; font-family: Consolas;">&quot;</span><a href="localhost:8080%2Foauth%2Ftoken" style="overflow-wrap: break-word; border-bottom: none; font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(109, 179, 63); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">localhost:1112/oauth/token</a><span style="font-size: 12pt; font-family: Consolas;">&quot;</span><span style="font-size: 12pt; font-family: Consolas;">   -d &quot;</span><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">grant_type=</span><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">authorization_code&amp;</span><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">code=</span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">NE325Y&amp;</span><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">client_id=</span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">usermessage-provider&amp;</span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">redirect_uri=</span><span style="font-size: 11pt;"><a href="http://localhost:1112/user/hello" style="font-size: 11pt; font-family: Lato;">http://localhost:1112/user/hello</a></span>&amp;<span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">Authorization=</span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">Basic</span> <span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">dXNlcm1lc3NhZ2UtcHJvdmlkZXI6MTIzNDU2&quot;</span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X POST </span><span style="font-size: 12pt; font-family: Consolas;">&quot;</span><a href="localhost:8080%2Foauth%2Ftoken" style="overflow-wrap: break-word; border-bottom: none; font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(109, 179, 63); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">localhost:1112/oauth/token</a><span style="font-size: 12pt; font-family: Consolas;">&quot; -H 'Content-Type: application/json' -d '{</span></div><div><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">&quot;grant_type&quot;:&quot;</span><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">authorization_code&quot;,</span></div><div><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">&quot;</span><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">code&quot;:&quot;</span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">NE325Y&quot;,</span></div><div><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">&quot;</span><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">client_id&quot;:&quot;</span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">usermessage-provider</span><span style="font-size: 14px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(76, 73, 72); font-family: Lato, &quot;Josefin Sans&quot;, &quot;PingFang SC&quot;, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;">&quot;</span></div><div><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">&quot;</span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">redirect_uri</span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">&quot;:&quot;</span><span style="font-size: 11pt;"><a href="http://localhost:1112/user/hello" style="font-size: 11pt; font-family: Lato;">http://localhost:1112/user/hello</a></span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">&quot;,</span></div><div><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">&quot;Authorization&quot;:  &quot;Basic</span> <span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">dXNlcm1lc3NhZ2UtcHJvdmlkZXI6MTIzNDU2</span><span style="font-size: 11pt; color: rgb(76, 73, 72); font-family: Lato;">&quot;</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}'</span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt; font-family: Consolas;">usermessage-provider:123456 base64-&gt; </span><span style="font-size: 12pt; font-family: Consolas;">dXNlcm1lc3NhZ2UtcHJvdmlkZXI6MTIzNDU2</span><span style="font-size: 12pt; font-family: Consolas;"> </span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X POST &quot;localhost:1113/oauth/token&quot; -d &quot;grant_type=password&amp;username=</span><span style="font-size: 12pt; font-family: Consolas;">123&amp;password=123</span><span style="font-size: 12pt; font-family: Consolas;">&amp;</span><span style="font-size: 12pt; font-family: Consolas;">Authorization=Basic </span><span style="font-size: 12pt; font-family: Consolas;">dGVzdDE6dGVzdDExMTE=</span><span style="font-size: 12pt; font-family: Consolas;">&amp;scope=all</span><span style="font-size: 12pt; font-family: Consolas;">&quot;</span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X POST &quot;localhost:8080/oauth/token&quot; -d &quot;grant_type=password&amp;username=</span><span style="font-size: 12pt; font-family: Consolas;">123&amp;password=123456</span><span style="font-size: 12pt; font-family: Consolas;">&amp;</span><span style="font-size: 12pt; font-family: Consolas;">Authorization=Basic </span><span style="font-size: 12pt; font-family: Consolas;">dGVzdDE6dGVzdDExMTE=</span><span style="font-size: 12pt; font-family: Consolas;">&amp;scope=all</span><span style="font-size: 12pt; font-family: Consolas;">&quot;</span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt; font-family: Consolas;">分页查询:</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200/bank/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;query&quot;: { &quot;match_all&quot;: {} },</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;sort&quot;: [</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    { &quot;account_number&quot;: &quot;asc&quot; }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  ],</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;from&quot;: 10,</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;size&quot;: 10</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">根据字段查询模糊查询只要包含mill,lane</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200/bank/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;query&quot;: { &quot;match&quot;: { &quot;address&quot;: &quot;mill lane&quot; } }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">按照短语模糊查找:</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200/bank/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;query&quot;: { &quot;match_phrase&quot;: { &quot;address&quot;: &quot;mill lane&quot; } }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">多条件查询</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200/bank/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;query&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    &quot;bool&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;must&quot;: [</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        { &quot;match&quot;: { &quot;age&quot;: &quot;40&quot; } }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      ],</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;must_not&quot;: [</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        { &quot;match&quot;: { &quot;state&quot;: &quot;ID&quot; } }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      ]</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">过滤:</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200/bank/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;query&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    &quot;bool&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;must&quot;: { &quot;match_all&quot;: {} },</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;filter&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        &quot;range&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">          &quot;balance&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">            &quot;gte&quot;: 20000,</span></div><div><span style="font-size: 12pt; font-family: Consolas;">            &quot;lte&quot;: 30000</span></div><div><span style="font-size: 12pt; font-family: Consolas;">          }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt;"><br/></span></div><div><span style="font-size: 12pt; font-family: Consolas;">聚和操作分组:</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200/bank/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;size&quot;: 0,</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;aggs&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    &quot;group_by_state&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;terms&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        &quot;field&quot;: &quot;state.keyword&quot;</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">分组state求平均值balance</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200/bank/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;size&quot;: 0,</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;aggs&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    &quot;group_by_state&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;terms&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        &quot;field&quot;: &quot;state.keyword&quot;</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      },</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;aggs&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        &quot;average_balance&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">          &quot;avg&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">            &quot;field&quot;: &quot;balance&quot;</span></div><div><span style="font-size: 12pt; font-family: Consolas;">          }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">聚合中指定顺序来使用嵌套聚合的结果进行排序</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200/bank/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;size&quot;: 0,</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;aggs&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    &quot;group_by_state&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;terms&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        &quot;field&quot;: &quot;state.keyword&quot;,</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        &quot;order&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">          &quot;average_balance&quot;: &quot;desc&quot;</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      },</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;aggs&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        &quot;average_balance&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">          &quot;avg&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">            &quot;field&quot;: &quot;balance&quot;</span></div><div><span style="font-size: 12pt; font-family: Consolas;">          }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">全文查询</span></div><div><span style="font-size: 12pt; font-family: Consolas;">curl -X GET &quot;localhost:9200</span><span style="font-size: 12pt; font-family: Consolas;">/bank</span><span style="font-size: 12pt; font-family: Consolas;">/_search?pretty&quot; -H 'Content-Type: application/json' -d'</span></div><div><span style="font-size: 12pt; font-family: Consolas;">{</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  &quot;query&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    &quot;match&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      &quot;message&quot;: {</span></div><div><span style="font-size: 12pt; font-family: Consolas;">        &quot;query&quot;: &quot;</span><span style="font-size: 12pt;"><a href="mailto:schwartzbuchanan@sybixtex.com" style="font-size: 12pt; font-family: Consolas;">schwartzbuchanan@sybixtex.com</a></span><span style="font-size: 12pt; font-family: Consolas;">&quot;</span></div><div><span style="font-size: 12pt; font-family: Consolas;">      }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">    }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">  }</span></div><div><span style="font-size: 12pt; font-family: Consolas;">}</span></div><div><span style="font-size: 12pt; font-family: Consolas;">'</span></div><div><span style="font-size: 12pt;"><br/></span></div><div><img src="es_files/Image [5].png" type="image/png" data-filename="Image.png"/></div><div><img src="es_files/Image [6].png" type="image/png" data-filename="Image.png"/></div><div><br/></div></span>
</div></body></html>