project/es/es.html

19 lines
26 KiB
HTML
Raw Normal View History

<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); f
</div></body></html>