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));
}
NEST health与settings的更多相关文章
- elasticsearch 操作
文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html 客户端:https://www.elasti ...
- Nest查询示例
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- Elasticsearch NEST – Examples for mapping between Query and C#
Elasticsearch NEST – Examples for mapping between Query and C# During my training with Elasticsearch ...
- How to Optimize Battery Health?
1. click on the battery icon from taskbar next to the date and time. 2. click "More power optio ...
- NEST.net Client For Elasticsearch简单应用
NEST.net Client For Elasticsearch简单应用 由于最近的一个项目中的搜索部分要用到 Elasticsearch 来实现搜索功能,苦于英文差及该方面的系统性资料不好找,在实 ...
- Elasticsearch .Net Client NEST使用说明 2.x
Elasticsearch .net client NEST使用说明 2.x Elasticsearch.Net与NEST是Elasticsearch为C#提供的一套客户端驱动,方便C#调用Elast ...
- Nest客户端的基本使用方法
通过Nuget安装好Nest的相关Dll,之后我们就可以开始了, 1.初始化Nest客户端 string indexName = "customer"; Uri uri = new ...
- Elasticsearch .net client NEST 5.x 使用总结
目录: Elasticsearch .net client NEST 5.x 使用总结 elasticsearch_.net_client_nest2.x_到_5.x常用方法属性差异 Elastics ...
- Elasticsearch .net client NEST使用说明 2.x -更新版
Elasticsearch .net client NEST使用说明 目录: Elasticsearch .net client NEST 5.x 使用总结 elasticsearch_.net_cl ...
随机推荐
- 「HNOI2016」序列
传送门 Description 有 \(q\) 个询问,每个询问给定两个数\(l\) 和\(r\),求 \(a[l:r]\) 的不同子序列的最小值之和 Solution 校内模拟赛用了这道题,但是莫 ...
- vue中使用vue-pdf插件显示pdf
最近项目需求需要在vue中展示pdf,上网搜索了实现方法,找到vue-pdf这个插件非常好用,并且还有许多方法.属性能进行功能扩展. 一.安装 npm install --save vue-pdf 二 ...
- Apache ranger整合hive报错记录
版本信息如下: hadoop2.9.2 hive 2.x ranger 最新版2.1.0 在hive端部署完ranger 插件以后,在使用beeline连接查询数据库时报错,报错信息如下: verbo ...
- ICEM-空心圆柱体
原视频下载地址:https://pan.baidu.com/s/1boG49MB 密码: 4iq6
- 龙贝格积分(c++)
用龙贝格算法计算积分 #include <iostream> #include<cmath> #include <iomanip> using namespace ...
- 【CNN】--- 卷积过程中RGB与灰度的区别
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/hacker_Dem_br/article/ ...
- SQLServer charindex函数, 查 某个字符 或 某个字符串 在 另一个字符串中的位置
一:charindex()语法 CHARINDEX ( expression1 , expression2 [ , start_location ] ) 解析: expression1 必需 ---要 ...
- 一个非常好的开源项目FFmpeg命令处理器FFCH4J
项目地址:https://github.com/eguid/FFCH4J FFCH4J(原用名:FFmpegCommandHandler4java) FFCH4J项目全称:FFmpeg命令处理器,鉴于 ...
- [IR] Inverted Index & Boolean retrieval
教材:<信息检索导论> 倒排索引 How to build Inverted Index? 1. Token sequence. 2. Sort by terms. 3. Dictiona ...
- js中 这些值是false