curl -XPUT "http://localhost:9200/*/_settings" -d "{ """index""" : { """max_result_window""" : 10000000 } }" -H "Content-Type: application/json" -u elastic:12345678
curl -H "Content-Type: application/json" -u elastic:12345678 -XPUT http://127.0.0.1:9200/qyjs_mix_data_small/_settings -d '{ "index.max_result_window" :"20000000"}'
1. 查看es存在的索引
curl -XGET "http://localhost:9200/_cat/indices" -H "Content-type: application/json" -u elastic:12345678
2. 删除索引
curl -XDELETE -u elastic:12345678 "http://localhost:9200/sharingdata"
3. 设置最大分页
curl -XPUT "http://localhost:9200/*/_settings" -d "{ """index""" : { """max_result_window""" : 10000000 } }" -H "Content-Type: application/json" -u elastic:12345678
4. 修改es用户密码
curl -XPOST -H "Content-type: application/json" -u elastic:12345678 "http://127.0.0.1:9200/_xpack/security/user/elastic/_password?pretty" -d "{"""password""": """12345678"""}"
5. text类型字段ES 开启字段内存排序,设置fielddata = true
curl -XPUT "http://localhost:9200/sharingdata/_mapping" -H "Content-type: application/json" -d "{"""properties""": {"""systemnamerely""": {"""type""":"""text""","""fielddata""": true}}}" -u elastic:12345678
6. el-sql查询语句
POST /_xpack/sql?format=txt
{
"query":"select * from sharingdata limit 2"
}
注意:本文归作者所有,未经作者允许,不得转载