栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Elasticsearch常用请求

Elasticsearch常用请求

GET _search
{
  "query": {
    "match_all": {}
  }
}

#分词器测试 ik_smart  ik_max_word standard whitespace
GET _analyze
{
  "analyzer": "ik_smart",
  "text": ["2021-7897%¥%¥……"]
}

#检索索引里全部数据
GET /indices/_search

#查看所有索引(图表)
GET /_cat/indices?v

#查看某一索引
GET /indices

#查询
POST /indices/_search
 {
        "query": {
            "match": {
                "content": "2021-短期-GDFL001-1"
            }
        },
        "highlight": {
            "pre_tags": ["", ""],
            "post_tags": ["
", ""],
            "fields": {
                "content": {}
            }
        }
}

POST /indices/_search
 {
          "from": 0,
          "size": 10,
          "query": {
              "bool": {
                "must": [
                    {"match_phrase": { "content": "2021-短期-GDFL001-1"} }
                ]
              }
          },
      "_source": [
        "archivesId",
        "archivalDescriptionId",
        "content"
      ]
}

POST /indices/_search
{
   "query": {
            "match": {
                "content": {
                  "analyzer": "standard",
                  "query": "2021-7895"
                } 
            }
            
        },
         "highlight": {
            "pre_tags": ["", ""],
            "post_tags": ["
", ""],
            "fields": {
                "content": {}
            }
        }
}

        

待补充----
        

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/354854.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号