int beamWidth = 10;
double maxDistance = 100;
long [] targetIds = new long []{1,2,3,4,5,6,7,8,9};
Comparator<Neighbor> comparator = new Neighbor.DissimilarityComparator();
ScoreThreshold thresh = new L2Threshold(maxDistance);
TLongObjectHashMap<Neighbor []> allSims = new TLongObjectHashMap<Neighbor []>();
for(long id : targetIds)
{
Neighbor [] sims = searcher.getScoredNeighbors(id, beamWidth, options.numPermutations, 20, comparator, thresh);
if(sims != null) allSims.put(id, sims);