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 ... 
随机推荐
- [bzoj1006](HNOI2008)神奇的国度(弦图最小染色)【太难不会】
			Description K国是一个热衷三角形的国度,连人的交往也只喜欢三角原则. 他们认为三角关系:即AB相互认识,BC相互认识,CA相互认识,是简洁高效的.为了巩固三角关系,K国禁止四边关系,五边关 ... 
- Python的函数参数和递归参数
			位置参数 def power(x): return x*x; 默认参数 指的是在函数定义的时候,就赋予一些参数默认值,在调用这个函数的时候不必多次传入重复的参数值. 如定义一个多次输出同一个年龄阶段和 ... 
- Apache2.4.6添加虚拟主机提示:NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/extra/httpd-vhosts.conf
			[root@localhost conf]# service httpd restart 停止 httpd: [确定] 启动 httpd:AH00548: NameVirtualHost has no ... 
- 方差分析anova
			方差分析 参考:http://wiki.mbalib.com/wiki/%E6%96%B9%E5%B7%AE%E5%88%86%E6%9E%90 方差分析(Analysis of Variance, ... 
- \r和\n的区别
			/n 是换行/r 是回车 这是两码事,换行是指移动到下一行,回车是指移动到行首,我们通常所说的“回车”其实是这两个动作的结合. 
- Ubuntu下Firefox无法播放视频的解决方法
			Ubuntu为Firefox安装Adobe Flash Player 解决方法(解决火狐浏览器安装了三个flash插件中的第二个或者第三个插件而无法安装第一个adobe flash插件的方法):在新立 ... 
- 十三.spring-boot使用spring-boot-thymeleaf
			thymeleaf 比如freemaker的要高,thymeleaf是一个支持html原型的自然引擎,它在html 标签增加额外的属性来达到模板+数据的展示方式,由于 浏览器解释html时,忽略未定义 ... 
- 【Todo】Boost安装与学习
			现在这里找下载包 http://sourceforge.net/projects/boost 我找的是 1_62_0 下面是从公司wiki上找到的一个说明. boost & thrift安装步 ... 
- Linux pci驱动源码
			#include <linux/kernel.h>#include <linux/errno.h>#include <linux/module.h>#include ... 
- unity shader 编译时间过长
			去掉opengles2.0能省一半时间 换ssd Compiled shader 'Shader Forge/Scenes_Ground_Standard_M' in 315.51s gles ... 
