mapping source must be pairs of fieldnames and properties definition

导火索:由于需要初始化索引配置,初始化时增加了索引,但是索引中无数据。因为查询列表中要用到这个字段排序,在查询列表中找不到这个字段导致报错。

解决:增加该字段的mapping字段映射即可,如下方法:

/**
 * 创建索引并配置索引相关参数
 *
 * @param elasticsearchClient
 * @param indexName
 * @param configMap
 * @throws IOException
 */
public static void createIndex(RestHighLevelClient elasticsearchClient, String indexName, Map<String,String> configMap) throws IOException {
    //创建索引
    CreateIndexRequest createIndexRequest = new CreateIndexRequest(indexName);
    Settings esSetting = Settings.builder()
            .put("index.max_result_window", configMap.get("max_result_window"))//设置允许最大值
            .build();
    createIndexRequest.settings(esSetting);
    if (IndexConstant.LOG_INDEX_TEST.equals(indexName)) {//日志索引
        createIndexRequest.mapping("_doc","{\n" +
                "\"properties\": {\n" +
                "\"startTime\": {\n" +
                "\"type\": \"long\"\n" +
                "}\n" +
                "}\n" +
                "}", XContentType.JSON);
    }
    elasticsearchClient.indices().create(createIndexRequest, RequestOptions.DEFAULT);
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The Logistic map is a classical chaotic system and has been used as a chaotic cipher in the real number field. This inevitably leads to the degradation of finite precision under the computer environment, and it also is very difficult to guarantee the security of the cryptosystem using the Logistic map over the real number field. To overcome these drawbacks, in this paper, we extend the Logistic map-3 to the finite field Z 3 n , and give theoretical analysis about some period properties of the Logistic map-3 over Z 3 n . Moreover, we discuss the control parameters which can change the behavior of the mapping, and also find that the maximum period can change with the control parameter. Furthermore, we analyze some characteristics including maximum period, generation time, NIST test, power spectrum, correlation property, phase diagram and Lyapunov exponent. Simulation results show that the period of Logistic map-3 over Z 3 n is longer than Logistic map-1 over Z 3 n , and much longer than Logistic map-1 over Z 2 n , and the same as Logistic map-2 over Z 3 n . Simulation experiments also show that the Logistic map-3 over the finite field has some good features including non-periodic, random, noise-like properties, continuous spectrum, good correlation, well uniform distribution, controllable length of generated sequence, positive Lyapunov exponent, and good sequence generation speed. Therefore, we attempt to design a nonlinear transformation based key stream generator by using the Logistic map-3 over Z 3 n and apply to image encryption. The performance analyses including statistical analysis, Shannon entropy analysis, differential attack analysis, and speed analysis also show that our proposed method may be suitable for practical cryptographic application

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值