Remove documents with certain conditions based on what exists in another index

Today I have two indices (Lets call them A and B).

Index A contains "rawdata" and Index B is a simple index with one column with different values. What I want to do is to remove or mark documents if it contains values that exists in Index B.

Is this possible?
Should I use Python API for this?
Or should I do this in an earlier stage with logstash and/or filebeat?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.