zoukankan      html  css  js  c++  java
  • NEST health与settings

            /// <summary>
            /// 创建Idx,并设置分片和副本
            /// </summary>
            public void Settings()
            {
                var response = client.CreateIndex("test01", e => e.Settings(s => s.NumberOfReplicas(3).Setting("number_of_shards", 3)));
                Console.WriteLine(JsonConvert.SerializeObject(response));
            }
    
            /// <summary>
            /// 更新settings
            /// </summary>
            public void UpdateSettings()
            {
                var response = client.UpdateIndexSettings("test01", x => x.IndexSettings(s => s.Setting("number_of_replicas", 2)));
                Console.WriteLine(JsonConvert.SerializeObject(response));
            }
    
            /// <summary>
            /// CatHealth
            /// </summary>
            public void CatHealth()
            {
                var response = client.CatHealth(e => e.Pretty());
                Console.WriteLine(JsonConvert.SerializeObject(response));
            }
    
            /// <summary>
            /// ClusterHealth
            /// </summary>
            public void ClusterHealth()
            {
                var response = client.ClusterHealth(e => e.Pretty());
                Console.WriteLine(JsonConvert.SerializeObject(response));
            }
    
            /// <summary>
            /// 查看setting
            /// </summary>
            public void GetIndexSettings()
            {
                var response = client.GetIndexSettings(x => x.Index("test01").Pretty());
                Console.WriteLine(JsonConvert.SerializeObject(response));
            }
    

      

  • 相关阅读:
    eclipse
    一次性验证码
    mybatis。逆向工程
    mybatis02.动态sql
    mybatis01
    plsql
    HDU.2149 Public Sale (博弈论 巴什博弈)
    HDU.1846 Brave Game (博弈论 巴什博弈)
    博弈论快速入门
    HUD.2795 Billboard ( 线段树 区间最值 单点更新 单点查询 建树技巧)
  • 原文地址:https://www.cnblogs.com/chenyishi/p/11542836.html
Copyright © 2011-2022 走看看