`curl '10.95.32.34:9200/_cat/indices?v'`
创建索引
我们提供的服务有:成都做网站、网站制作、微信公众号开发、网站优化、网站认证、延边朝鲜族ssl等。为上千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的延边朝鲜族网站制作公司curl -XPUT '10.95.32.34:9200/customer-test?pretty'
插入数据:
curl -XPUT '10.95.32.34:9200/customer-test/employee/2?pretty' -d '{"name": "John smart"}'
curl -XPUT '10.95.32.34:9200/customer-test/employee/1' -d '{"first_name":"John","last_name":"Smith","age":25,"about":"Ilovetogorockclimbing","interests":["sports","music"]}'
查看数据:
curl -XPOST '10.95.32.34:9200/customer-test/_search?pretty'
查看健康:
[root@server02 ~]# curl -sXGET 'http://localhost:9200/_cluster/health?pretty'
{
"cluster_name" : "es",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 9,
"number_of_data_nodes" : 9,
"active_primary_shards" : 129,
"active_shards" : 258,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
找到未分片的索引
curl -s "http://localhost:9200/_cat/shards" | grep UNASSIGNED
删除索引:
curl -XDELETE 'http://localhost:9200/noah_flow_file_20190625'
curl -s 'http://localhost:9200/_cat/shards' | grep UNASSIGNED | awk '{print $1}' | sort | uniq
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。