private void work() throws Exception { System.out.println("Indexing all events..."); for (Event event : eventDao.getEvents()) { indexEvent(event); } SearchService.IndexStatistics statistics = searchService.getIndexStatistics(); System.out.println("The index now contain " + statistics.numberOfDocuments + " documents."); }
private void indexSession(Session session) { System.out.println("Indexing session: " + session.getTitle() + " (" + session.getId() + ")..."); searchService.update(session); }