我在es的保存的一个字段response, 保存的值是json字符串,通过kibana查询结果如下:
"response" : """{"isCallThirdParty":"0","callThirdPartyStat":"1","useCache":"0","ret":0,"response_from":"ttt"}"""
//useCache 值存在1,也存在0;
现在我的问题是如何找出:"useCache":"1" 的所有数据呢? 索引名称是call_log.
我在es的保存的一个字段response, 保存的值是json字符串,通过kibana查询结果如下:
"response" : """{"isCallThirdParty":"0","callThirdPartyStat":"1","useCache":"0","ret":0,"response_from":"ttt"}"""
//useCache 值存在1,也存在0;
现在我的问题是如何找出:"useCache":"1" 的所有数据呢? 索引名称是call_log.
{
"query": {
"wildcard": {
"response": "*useCache\":\"1\"*"
}
}
}
*号开头性能不怎么好,好点的方式是,response直接以键对值写入es,不要用字符串,这样就可以精确查询useCache的值