public Query getRandomIndexWordQuery(POS pos) throws JWNLException {
MinMax minMax = _minMaxIds.get(pos);
if (minMax == null) {
Query query = createPOSQuery(pos, COUNT_INDEX_WORDS_SQL);
try {
query.execute();
query.getResults().next();
minMax = new MinMax(query.getResults().getInt(1), query
.getResults().getInt(2));
_minMaxIds.put(pos, minMax);
} catch (SQLException ex) {