Finding Duplicates in Large Datasets with Elasticsearch Without Using Scroll API or Custom Scripts
Given that a product ID may have duplicates with an order ID, we need to count the number of duplicates for each product ID and list all the associated product IDs.