1

我有一个这样的 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

4

1 回答 1

1

我已经尝试过了,它有效:创建模式 MyInnerEvent(_c int); 创建模式 MyEvent(_a int, _b MyInnerEvent); 从 MyEvent 中选择 _b._c;

于 2015-01-28T22:11:52.547 回答