查看es中有哪些索引
请求方式:GET
请求地址:http://localhost:9200 /_cat/indices?v
参数:无
结果:
查看索引全部数据
请求方式:GET
请求地址:http://localhost:9200/index-2023-08/_search
参数:
{
   "query":{
      "match_all":{}
   }
} 
结果:
查询多1个数据
请求方式:GET
请求地址:http://localhost:9200/index-2023-08/_search
解释:http://地址:端口/index名/_search
参数:
{
  "query": {
    "match": {
      "ability": "我是中国人"
    }
  }
}
 
结果:
查询多个Index数据
请求方式:GET
请求地址:http://localhost:9200/index-2023-08,index-2023-07,index-2023-06/_search
解释:多个Index可以用 “ , ” 间隔开,示例: index1,index2,index3
参数:
{
   "query":{
      "match_all":{}
   }
} 
结果:
冻结索引
请求方式:POST
请求地址:http://localhost:9200/index-2023-08/_freeze
解释:http://地址:端口/index名/_freeze
参数:无
结果:
{
    "acknowledged": true,
    "shards_acknowledged": true
} 

冻结索引
请求方式:POST
请求地址:http://localhost:9200/index-2023-08/_unfreeze
解释:http://地址:端口/index名/_unfreeze
参数:无
结果:
{
    "acknowledged": true,
    "shards_acknowledged": true
} 

创建索引
请求方式:PUT
请求地址:http://localhost:9200 /index-2023-08
参数:
{
	"settings": {
		"index.max_result_window": 1000000,
		"index.number_of_replicas": 1,
		"index.number_of_shards": 1
	},
	"mappings": {
		"properties": {
			"title": {
				"type": "text"
			},
			"name": {
				"type": "text"
			},
			"description": {
				"type": "text"
			},
			"create_time": {
				"type": "keyword"
			},
			"time_stamp": {
				"type": "keyword"
			},
			"created_user": {
				"type": "date"
			}
		}
	}
} 
结果:
{
    "acknowledged": true,
    "shards_acknowledged": true,
    "index": "index-2023-08"
} 




















