官方資源連接web
動手實踐windows
當前最新版本 Elasticsearch 7.7.0瀏覽器
運行環境elasticsearch
下載 我的以爲迅雷相對較快工具
解壓運行啓動服務spa
elasticsearch/bin elasticsearch.bat #編輯 kibana.yml elasticsearch.hosts: ["http://localhost:9200"] #若elasticsearch開啓用戶密碼則須要配置 elasticsearch.username: "elastic" elasticsearch.password: "changeme" 國際化中文界面開啓 i18n.locale: "zh-CN" #雙擊啓動 bin/kibana.bat #瀏覽器訪問 http://localhost:5601/
菜單點擊dev-tools工具進行基本使用調試 調試
GET _count { "query": { "match_all": {} } }
PUT testuser/_doc/1 { "name":"kuKi", "address":"北京", "sex":"女", "about":"runing climbing joking", "age":24 }
GET testuser/_doc/1
GET testuser/_search
GET testuser/_search?q=address:上海
GET testuser/_search
{"query":{ "match": { "address": "上海" } }}
GET testuser/_search { "query":{ "bool": { "must": [ {"match": { "address": "上海" }} ], "filter": [ { "range": { "age": { "gte": 15, "lte": 25 } } } ] } } }
GET testuser/_search { "query": { "match": { "address": "北京" } } }
GET testuser/_search { "query": { "match_phrase": { "about": "runing climbing" } } }
GET testuser/_search { "query": { "match_phrase": { "about": "runing climbing" } }, "highlight": { "fields": { "about": {} } } }
GET testuser/_search { "query":{ "bool": { "must": [ {"match": { "address": "上海" }} ], "filter": [ { "range": { "age": { "gte": 15, "lte": 25 } } }]}}}
GET testuser/_analyze { "text": ["goods morning every body"] }
code