Пример #1
0
  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.");
  }
Пример #2
0
 private void indexSession(Session session) {
   System.out.println("Indexing session: " + session.getTitle() + " (" + session.getId() + ")...");
   searchService.update(session);
 }