Hi All,
We store below kind of data in elasticsearch index namely, mydevices. The index contains information for every few seconds related to the devices whether its up or not, which is like, if the document having status as 0 then its device is down, else device is up.
The index stores both the data, i.e., device down, as well as device up. I am interested to remove documents if status is 0.
Can someone please help with any query for deleting the documents from the index if the status value is 0.
here is the sample data for your reference -
Location: 'L1' Device Id: '9hBEyixlnmzCbv5sVev6Iv', Device Name: 'VELP0438H' --> Status: 0
Location: 'L2' Device Id: 'ZpZ9AP52EEL12h71YoUtZB', Device Name: 'VELP1208H' --> Status: 0
Location: 'L3' Device Id: 'ZpZ9AP52EEL81h71YoUtZB', Device Name: 'VELP1181H' --> Status: 1
Location: 'L1' Device Id: '9hBEyixlnmzCbv5sVev6Iv', Device Name: 'VELP0438H' --> Status: 0
Location: 'L2' Device Id: 'ZpZ9AP52EEL12h71YoUtZB', Device Name: 'VELP1208H' --> Status: 1
Location: 'L3' Device Id: 'ZpZ9AP52EEL81h71YoUtZB', Device Name: 'VELP1181H' --> Status: 0
Location: 'L1' Device Id: '9hBEyixlnmzCbv5sVev6Iv', Device Name: 'VELP0438H' --> Status: 0
Location: 'L2' Device Id: 'ZpZ9AP52EEL12h71YoUtZB', Device Name: 'VELP1208H' --> Status: 0
Location: 'L3' Device Id: 'ZpZ9AP52EEL81h71YoUtZB', Device Name: 'VELP1181H' --> Status: 11