How to remove all the duplicate results in Hibernate Search?
问题 I'm using Infinispan with 6.0.2 with Hibernate Search 4.4.0. In the begining, after I execute a query like CacheQuery cq = SearchManager.getQuery(query,Hibernate.class).projection("id"); I use the cq.list() to get "id". But now the number of results reaches 300.000, because of the designing fo DB(cant change), the duplicate id is almost 29,000. I wrote this to get "id": for(int i=0;i<listObject.size();i++) { Object[] rdf = (Object[])listObject.get(i); if(!result.contains((String) rdf[0]))