1. 查看所有索引:
GET _cat/indices
2. 查看索引的数据:
GET /xxx/_search
{
"query": {
"match_all": {
}
}
}
3.查看索引别名:
GET /xxx/_alias
4.查询某个字段是否为空:
GET /xxx/_search
{
"query": {
"bool": {
"must_not": {
"exists": {
"field": "idInfo.lessonId"
}
}
}
}
}
5.设置别名
POST _aliases
{
"actions" : [{"add" : {"index" : "xxx" , "alias" : "tiku_live_stat"}}]
}
6.获取mapping:
GET xxx/_mapping
7.设置mapping:
put /xxxxx
{
"settings": {
"index": {
"number_of_shards" : "5",
"number_of_replicas" : "3"
}
}
}
PUT xxxxx/doc/_mapping
{
"properties" : {
}
}
PUT /la-doc-order_course_lct/_mapping/doc
{
“properties”: {
“cycleStartDate”: {
“type”: “keyword”
}
}
}