zoukankan      html  css  js  c++  java
  • 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"
    				}
    			}
    		}
    	}
    }
    

      

  • 相关阅读:
    [OpenCV] Ptr类模板
    [OpenCV]Mat类详解
    [C++] Vector用法
    [OpeCV] highgui头文件
    c++中的.hpp文件
    【2017】KK English
    CMake Tutorial & Example
    [g2o]C++图优化库
    Teradata基础教程中的数据库试验环境脚本
    Oracle中对象权限与系统权限revoke
  • 原文地址:https://www.cnblogs.com/anxbb/p/9383354.html
Copyright © 2011-2022 走看看