elasticsearch mapping问题解决
1.报错信息如下:
[--16T00::,][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>, :action=>["index", {:_id=>nil, :_index=>"filebeat-api-2018.07.15", :_type=>"doc", :_routing=>nil}, #<LogStash::Event:0x38a5460c>], :response=>{"index"=>{"_index"=>"filebeat-api-2018.07.15", "_type"=>"doc", "_id"=>"erO0nmQB3VHsYd1y-IbI", "status"=>, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [params.end_day]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid format: \"\""}}}}}
日期格式不对报错,解决办法如下,建立一个map,关掉日期格式检测,对需要日期格式的字段加上date类型字段。这里也实现了field限制,将默认的1000加到了3000.
报错:
"reason"=>"object mapping for [params.commoditys] tried to parse field [commoditys] as object, but found a concrete value"}}}}
这个ignore_malformed设置为true解决
curl -XPUT "10.66.178.20:9200/_template/template_api" -H 'Content-Type: application/json' -d'{
"index_patterns":["filebeat-api-*"],
"order":0,
"settings":{
"number_of_replicas":0,
"index":{
"mapping":{
"ignore_malformed": true,
"total_fields": {
"limit": "3000"
}
}
}
},
"mappings": {
"doc": {
"date_detection": false,
"properties": {
"@timestamp": {
"type": "date"
}
}
}
}
}'
elasticsearch mapping问题解决的更多相关文章
- Elasticsearch教程(五) elasticsearch Mapping的创建
一.Mapping介绍 在Elasticsearch中,Mapping是什么? mapping在Elasticsearch中的作用就是约束. 1.数据类型声明 它类似于静态语言中的数据类型声明,比如声 ...
- Elasticsearch mapping映射文件设置没有生效
Elasticsearch mapping映射文件设置没有生效 问题背景 我们一般会预先创建 Elasticsearch index的 mapping.properties 文件(类似于MySQL中的 ...
- elasticsearch mapping demo
curl -XPUT localhost:9200/local -d '{ "settings" : { "analysis" : { "analyz ...
- elasticsearch Mapping 定义索引
Mapping is the process of defining how a document should be mapped to the Search Engine, including i ...
- elasticsearch mapping简单介绍
这两天一直在看elasticsearch相关的内容,看到mapping这一块,就折腾了下. 一般情况下,我们不需要对elasticsearch的mapping进行设置,但如果希望对索引使用自定义的管理 ...
- 如何设计一个高性能 Elasticsearch mapping
目录 前言 mapping mapping 能做什么 Dynamic mapping dynamic=true dynamic=runtime dynamic=false dynamic=strict ...
- Elasticsearch mapping
//设置mapping Put: http://192.168.1.102:9200/indexName { "settings": { , }, "mappings&q ...
- python笔记31-使用ddt报告出现dict() -> new empty dictionary dict(mapping) 问题解决
使用ddt框架生成html报告的时候,出现:dict() -> new empty dictionary dict(mapping) -> new dictionary initializ ...
- ElasticSearch Mapping中的字段类型
1)string: 默认会被分词 2)数字类型主要如下几种: long:64位存储 integer:32位存储 short:16位存储 byte:8位存储 double:64位双精度存储 f ...
随机推荐
- 20172333 2017-2018-2 《Java程序设计》第4周学习总结
20172333 2017-2018-2 <Java程序设计>第4周学习总结 教材学习内容 1.类结构的定义与概念 2.利用实例数据建立对象状态的概念 3.描述可见性修饰符作用在方法和数据 ...
- codevs 2185 最长公共上升子序列--nm的一维求法
2185 最长公共上升子序列 时间限制: 1 s 空间限制: 32000 KB 题目等级 : 钻石 Diamond 题目描述 Description 熊大妈的奶牛在小沐沐的熏陶下开始研究信息题目 ...
- SNAT的作用是什么
SNAT,可能有人觉得奇怪,好好的为什么要进行ip地址转换啊,为了弄懂这个问题,我们要看一下局域网用户上公网的原理,假设内网主机A(192.168.2.8)要和外网主机B(61.132.62.131) ...
- 如何提高iOS开发能力
① 阅读技术博客 在现在这个年代,博客的风头早已被微博盖过.但是每天早上上班后的半小时,一定是打开博客,其中有讨论技术的,也有总结个人的相关经历,读完后肯定会有所收获.阅读博客,还有一个原因是技术博客 ...
- Jenkins升级;yum 安装软件升级
1.使用yum安装的jenkins升级方法: 先升级yum yum update 后升级jenkins yum update jenkins 但是上面的方法,限制于yum的版本,不能更新到jenkin ...
- ArcGIS Server10.1之服务新特性(WMTS1.0.0) 【转】
http://blog.csdn.net/esrichinacd/article/details/7825587 ArcGIS Server10.1正式支持OGC的WMTS1.0.0版本标准,那么如何 ...
- 如何在Visual Studio中加载web load test的后缀为.ltrar的结果文件
1. From a Web performance and load test project, open a load test. 2. On the embedded toolbar, cho ...
- C++ 重写重载重定义区别
C++ 重写重载重定义区别 (源自:http://blog.163.com/clevertanglei900@126/blog/static/111352259201102441934870/) 1 ...
- jTemplates模板学习笔记
1.jTemplates工作方式 1)setTemplateElement:指定可处理的模板对象 2)processTemplate:对模板化的对象进行数据处理 2.语法解析 1)jTempl ...
- thinkphp3.2中在模板页面使用运算符
首先要明确的是,ThinkPHP 内置模板引擎支持在模板中使用算术运算符(+.-.*./ 和 %),例子: public function index(){ $x = 1; $y = 2; $z = ...