If I understand your question correctly you want to search for all entries that match either IPV4_DST_ADDR or IPV4_SRC_ADDR to be 120.127.182.114.
As these are IP addresses, I'd recommend storing them in a field with the IP data type. This will allow you to query for subnets in addition to exact IP addresses.
Your query should contain a shouldboolean query block, such as
yes, my code is the same with you .
but it can't distinguish in_bytes and out_bytes belongs to IPV4_SRC_ADDR:120.127.182.114
or IPV4_DST_ADDR:120.127.182.114
because I want to sum:
IPV4_SRC_ADDR:120.127.182.114 in_bytes+IPV4_DST_ADDR:120.127.182.114 out_bytes
Have a look at Filter Aggregations. You'll have to set up different aggregations for IPV4_DST_ADDR and IPV4_SRC_ADDR, and apply the appropriate filter for each.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.