public LuceneLocationResolver(File indexDir, int maxHitDepth, int maxContextWindow) throws IOException, ParseException {
// load the Lucene index directory from disk
index = FSDirectory.open(indexDir);
// index employs simple lower-casing & tokenizing on whitespace
indexAnalyzer = new WhitespaceLowerCaseAnalyzer();
indexSearcher = new IndexSearcher(DirectoryReader.open(index));
// override default TF/IDF score to ignore multiple appearances
indexSearcher.setSimilarity(new BinarySimilarity());