例如MySQL查询。
SELECT fields_a, fields_b FROM table WHERE fields_a > fields_b;
我正在尝试实现elasticsearch。我已经尝试了以下步骤:
$where = [ "query" => [ "filter" => [ "script" => [ "script" => "doc[\"fields_a\"].value > doc[\"fields_b\"].value" ] ] ] ];
我错过了什么吗?
$where = [ "query" => [ "filter" => [ "script" => [ "script" => "doc[\"fields_a\"].value > doc[\"fields_b\"].value" ] ] ] ];
- cikewang