我有来自外部来源的数据,我在Discover of Kibana中的一个字段是' clearancetime '。此字段为空或具有以下格式的时间戳:
January 22nd 2017, 00:00:00.000
我编写了一个在三元语句中使用清除时间的字段。我认为在Discover中出现错误,表达式中使用的字段cleartime在映射中不存在。所以我尝试通过以下PUT请求添加它:
PUT source*/_mappings/clearancetime
{
"properties": {
"data": {
"type": "date"
}
}
}
我收到回复:{ "acknowledge": true }
但我仍然得到映射错误中不存在的相同字段。
有什么想法吗?
更新: 一些附加的错误信息(抱歉格式)....
Error: Request to Elasticsearch failed: {"error":
{"root_cause":[{"type":"script_exception",
"reason":"Field [clearancetime] used in expression does not exist in mappings"}],
"type":"search_phase_execution_exception","reason":"all shards failed",
"phase":"query","grouped":true,"failed_shards":
[{"shard:0,"index":"source-raw-2017.01","node":"dewddasOSada_0vJWA",
"reason":{"type":"script_exception","reason":"Error during search with inline script
[doc['clearancetime'].value > 0 ? doc['clearancetime'].value - doc['initialtime'].value : 0] using lang [expression]",
"caused_by":{"type":"script_exception",
"reason":"Field [clearancetime] used in expression does not exist in mappings"}}}]}}
脚本字段名为" duration"具有以下三元表达式:
doc['clearancetime'].value > 0 ? doc['clearancetime'].value - doc['initialtime'].value : 0
答案 0 :(得分:0)
如果mapping
clearancetime
PUT source*/_mappings/clearancetime
{
"properties": {
"data": {
"type": "date",
"index": true
}
}
}
,index参数可以使字段可查询,该怎么办?
clearancetime
由于date
的数据类型为doc['clearancetime'].value
,因此您不应该使用Date Field API来获取值而不是data <- mx.symbol.Variable("data")
fc1 <- mx.symbol.FullyConnected(data, name="fc1", num_hidden=3)
act1 <- mx.symbol.Activation(fc1, name="sigm1", act_type="sigmoid")
fc2 <- mx.symbol.FullyConnected(act1, name="fc2", num_hidden=3)
act2 <- mx.symbol.Activation(fc2, name="sigm2", act_type="sigmoid")
fc3 <- mx.symbol.FullyConnected(act2, name="fc3", num_hidden=3)
act3 <- mx.symbol.Activation(fc3, name="sigm3", act_type="sigmoid")
fc4 <- mx.symbol.FullyConnected(act3, name="fc4", num_hidden=1)
linear_reg_ output <- mx.symbol.LinearRegressionOutput(fc4, name="output")
?< / p>