threshold = req.getParams().getFloat(THRESHOLD, DEFAULT_DICTIONARY_THRESHOLD);
} catch (NumberFormatException e) {
throw new RuntimeException("Threshold must be a valid positive float", e);
}
IndexReader indexReader = req.getSearcher().getReader();
return new HighFrequencyDictionary(indexReader, termSourceField, threshold);
}