How to remove duplicate tweets using twitter search api via twitter-4j-core-3.0.3.jar


I am setting the max_id correctly for each of the query, but I am not sure why everytime I am getting duplicate tweets. Is there any way to avoid this. I am using the query.nextQuery() method for the nextquery.