else
currentPage = Integer.parseInt(page);
reader = DirectoryReader.open(directory);
long start = System.currentTimeMillis();
searcher = new IndexSearcher(reader);
TopScoreDocCollector collector = TopScoreDocCollector.create(MAX_RESULTS, true);
searcher.search(q, collector);
long end = System.currentTimeMillis();
log.info("Search: {} millis.", end - start);
ScoreDoc[] hits = collector.topDocs((currentPage-1)*MAX_PER_PAGE, MAX_PER_PAGE).scoreDocs;
request.setAttribute("collector", collector);
request.setAttribute("searcher", searcher);
request.setAttribute("hits", hits);
} catch (ParseException e) {