@Override
 public void visit(Ticket ticket) {
   super.visit(ticket);
   try {
     indexer.index(ticket);
     if (visitorCount() % 10 == 0) {
       log.flush();
       indexer.commit();
     }
   } catch (Exception e) {
     e.printStackTrace(log);
   }
 }
 @Override
 public void end() {
   super.end();
   try {
     indexer.commit();
   } catch (Exception e) {
     e.printStackTrace(log);
   }
 }