• es学习-索引管理


    1.创建索引

    http://localhost:9200/suoyinguanli211/

    参数:

    {
       "settings":{
          "index":{
              "number_of_shards":3,分片数
              "number_of_replicas":2 副本数
         }
      }
    }

    结果如图

    修改索引信息

     url:http://localhost:9200/suoyinguanli211/_settings/

    参数:

    {
    "number_of_replicas":1
    }

    结果:

    定义映射类型:

    url:http://localhost:9200/suoyinguanli211-1/

    参数:

    {
    	"settings": {
    		"index": {
    			"number_of_shards": 3,
    			"number_of_replicas": 1
    		},
    		"mapping": {
    			"secilog": {
    				"properties": {
    					"name": {
    						"type": "string",
    						"index": "not_analyzed"
    					},
    					"name2": {
    						"type": "string",
    						"index": "analyzed"
    					}
    				}
    			}
    		}
    	}
    }
    

      

    结果:

    删除索引:

    url :delete http://localhost:9200/suoyinguanli211-1/

    获取索引:

     也可以指定输出的内容:http://localhost:9200/suoyinguanli211/_mapping,_settings/

    结果:

          

    {
    	"suoyinguanli211": {
    		"mappings": {},
    		"settings": {
    			"index": {
    				"creation_date": "1532779519842",
    				"number_of_shards": "3",
    				"number_of_replicas": "1",
    				"uuid": "E4vDOCwSQVKY_wN17QXVaQ",
    				"version": {
    					"created": "2040099"
    				}
    			}
    		}
    	}
    }
    

      

  • 相关阅读:
    01 Vue的起步和插值表达式
    06 扩展的对象的功能
    05 解构赋值
    04 函数之扩展运算符、箭头函数
    03 函数之默认值、剩余参数
    02 模板字符串
    01 let和const命令
    28 Bootstrap排版
    27 Bootstrap的列偏移
    26 Bootstrap的栅格系统
  • 原文地址:https://www.cnblogs.com/anxbb/p/9383354.html
Copyright © 2020-2023  润新知