elasticsearch 如何在使用NEST创建elasticsearch索引时设置最佳压缩,elasticsearch,nest,elasticsearch,Nest" /> elasticsearch 如何在使用NEST创建elasticsearch索引时设置最佳压缩,elasticsearch,nest,elasticsearch,Nest" />

elasticsearch 如何在使用NEST创建elasticsearch索引时设置最佳压缩

elasticsearch 如何在使用NEST创建elasticsearch索引时设置最佳压缩,elasticsearch,nest,elasticsearch,Nest,当我使用NEST 5.x在elasticsearch中创建新索引时,我正在尝试实现这一点: 索引编解码器 默认值使用LZ4压缩来压缩存储的数据,但这可以设置为最佳压缩,它使用DEFLATE来获得更高的压缩比,但会降低存储字段的性能 这是我的密码: var createIndexResponse = client.CreateIndex("index-name", c => c .Settings(s => s.Setting("index.codec", "best

当我使用NEST 5.x在elasticsearch中创建新索引时,我正在尝试实现这一点:

索引编解码器 默认值使用LZ4压缩来压缩存储的数据,但这可以设置为最佳压缩,它使用DEFLATE来获得更高的压缩比,但会降低存储字段的性能

这是我的密码:

 var createIndexResponse = client.CreateIndex("index-name", c => c
        .Settings(s => s.Setting("index.codec", "best_compression"))
        .Mappings(m => m
            .Map<Conference>(d => d
                .AutoMap()
            )
        )
    );
var createIndexResponse=client.CreateIndex(“索引名”,c=>c
.Settings(s=>s.Setting(“index.codec”、“最佳压缩”))
.Mappings(m=>m
.Map(d=>d
.AutoMap()
)
)
);
当我查询设置时:get localhost:9200/index name/\u设置 未设置index.codec属性

在ElasticSearch Nest 5.X中创建新索引时,如何设置index.codec


非常感谢,

请分享
createIndexResponse.DebugInformation
?@rob感谢您的回复:
从成功的低位调用构建的有效嵌套响应:/index name#此API调用的审核跟踪:-[1]HealthyResponse:节点:http://10.0.0.4:9200/ 拍摄时间:00:00:00.5095788#请求:{“设置”:{“index.codec”:“best_compression”},“mappings”:{“conference”:{“properties”:{“confId”:{“type”:“long”},“publicationDate”:{“type”:“date”},[…],“id”:{“type”:“long”}}响应:{“acknowledged”:{“shards\u Acowledged”:true}
看起来像是正确设置的index.codec。您确定localhost==10.0.0.4吗?