You can do it with a script query but it won't be able to use the index. If need to do this quickly then you should add a flag to the documents with the same accounts at ingest time. If you don't care about how slow the query is then go for the script query.
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.