不能在 ES 6.x 及更高版本的 index/update 请求上使用时间戳。请删除 [es.mapping.timestamp] 设置

Cannot use timestamps on index/update requests in ES 6.x and above. Please remove the [es.mapping.timestamp] setting

我正在使用 Spark Structured Streaming 写入 Elasticsearch 6.2.0 Sink:

dataDf  
  .writeStream
  .outputMode(OutputMode.Append)
  .format("org.elasticsearch.spark.sql")
  .queryName("ElasticSink")
  .option("checkpointLocation", s"${s3Url}/checkpoint_elasticsearch")
  ...
  .option("es.mapping.id", "TransactionID")
  .option("es.mapping.timestamp", "InvoiceDateString")
  .start("pos-transactions/broadcast") //ES index

但是,Elasticsearch 抱怨:

Cannot use timestamps on index/update requests in ES 6.x and above. Please remove the [es.mapping.timestamp] setting

是否有其他选项可用于声明时间戳字段?

最后,我创建了一个映射文档,这非常适合我: