ElasticSearch 之curl查看index以及settings

1.查看mapping

curl -u elastic:elastic -XGET "127.0.0.1:9200/index_name/_mapping"

2.查看settings

curl -u elastic:elastic -XGET "127.0.0.1:9200/index_name/_settings"

3.scroll查询

curl -u elastic:elastic -XPOST "127.0.0.1:9200/index_name/_search/?scroll=2m"

4.测试ik分词器

curl -u elastic:elastic -XGET "127.0.0.1:9200/_analyzer" -H 'Content-Type: application/json'  -d '
{
    "text":"中华人民共和国",
    "analyzer":"ik_max_word"

}'

5.脚本查询

curl -u elastic:elastic -XGET "127.0.0.1:9200/_analyzer" -H 'Content-Type: application/json'  -d '
{
    "query": {
        "match_all": {}
    }
}'

 

有时间再补充。。。

posted @ 2019-11-20 13:05  crazy-zz5536  阅读(834)  评论(0编辑  收藏  举报