我有这样的LinkedHashMap:
{_index=1, _type=zz, _source={custom_field=custom, field_0=Group, field_10=was, field_3}}
使用 EPL 语句,如何在EPL语句中访问custom_field。以下是我尝试过的一些事情
String expression = "select `_source.custom_field` from MyMapEvent";
String expression = "select \\_source.custom\\_field` from MyMapEvent";
可以在此处找到转义字符文档:http://esper.codehaus.org/esper-4.6.0/doc/reference/en-US/html_single/index.html#eventrep-properties-escaping
答案 0 :(得分:1)
我试过这个并且它有效:创建模式MyInnerEvent(_c int);创建模式MyEvent(_a int,_b MyInnerEvent);从MyEvent中选择_b._c;