} catch (RepositoryException e) {
throw Util.createIOException(e);
}
IndexReader reader = context.getIndexReader();
QueryHits hits = context.evaluate(and);
try {
matches = new HashMap<Integer, Float>();
ScoreNode sn;
while ((sn = hits.nextScoreNode()) != null) {
matches.put(sn.getDoc(reader), sn.getScore());
}
} finally {
hits.close();
}
}
}