小编chi*_*adx的帖子

Elasticsearch - 映射冲突错误从1.5升级到2.0

当我尝试启动集群的主节点时,刚刚从1.5升级到2.0(是的,这是一个很大的跳转),我收到此错误日志:

[2015-11-03 18:15:10,948][ERROR][gateway                  ] [mon-01] failed to read local state, exiting...
java.lang.IllegalStateException: unable to upgrade the mappings for the index [logstash-2015.10.18], reason: [Mapper for [timestamp] conflicts with existing mapping in other types:
[mapper [timestamp] cannot be changed from type [date] to [string]]]
Run Code Online (Sandbox Code Playgroud)

不幸的是,我没有该字段的详细描述或该字段的相关分析器配置,但正如其名称所述,它是logstash的时间戳,因此它应该看起来像下列之一:

  • "dd/MMM/yyyy:HH:mm:ss Z"
  • "YYYY-MM-dd HH:mm:ss"
  • "HH:MM:SS"
  • "YYYY-MM-dd HH:mm:ss,SSS ZZ"
  • "YYYY-MM-dd HH:mm:ss,SSSZZ"
  • "YYYY-MM-dd HH:mm:ss,SSS"

日志以此结束:

[2015-11-03 18:15:11,383][ERROR][bootstrap                ] Guice Exception: java.lang.IllegalStateException: unable to upgrade the mappings for the index [logstash-2015.10.18], reason: [Mapper for [timestamp] conflicts with existing mapping in …
Run Code Online (Sandbox Code Playgroud)

mapping elasticsearch

5
推荐指数
1
解决办法
7727
查看次数

客户端的gRPC上下文

我正在使用gRPC和protobuf(以及使用REST的gRPC网关)构建一个客户端/服务器系统.

我在服务器端的上下文中使用元数据来承载来自客户端的身份验证数据,这非常有效.

现在,我希望服务器设置一些元数据键/值,以便客户端可以获得它们以及响应.我怎样才能做到这一点?使用SetHeaderSendHeader?理想情况下,我希望服务器的每一个响应都能集成那些元数据(可以看作某种UnaryInterceptor,但是响应而不是请求?)

这是服务器客户端的代码.

go grpc

5
推荐指数
1
解决办法
4636
查看次数

标签 统计

elasticsearch ×1

go ×1

grpc ×1

mapping ×1