String q = makeHierachyQuery(levels);
DuplicateFilter filter = null;
filter = new DuplicateFilter(LEVEL+levelSize);
filter.setKeepMode(DuplicateFilter.KM_USE_FIRST_OCCURRENCE);
filter.setProcessingMode(DuplicateFilter.PM_FULL_VALIDATION);
TopScoreDocCollector collector = LuceneSupport.firstSearch(count,filter,q);
ScoreDoc[] sds = collector.topDocs().scoreDocs;
// System.out.println("***************"+count+","+q+","+sds.length);
convertScoreDoc2HSuggestions(result,sds,levels.length-1);
}else{
String q = makeQuery(query);
TopScoreDocCollector collector = LuceneSupport.firstSearch(count, null,q);
ScoreDoc[] sds = collector.topDocs().scoreDocs;
convertScoreDoc2Suggestions(result,sds,field);
}
// System.out.println("*************Suggestin:"+result);
return result;
}