Package org.apache.lucene.index

Examples of org.apache.lucene.index.IndexWriter.rollback()


            w.updateDocument(id, document);
//      w.commit();
        } catch (Exception e) {
            try {
                if (w != null) w.rollback();
            } catch (IOException ex) {
                ex.printStackTrace(System.err);
            }
            // TODO do stuff with exceptions
            e.printStackTrace(System.err);
View Full Code Here


                maybeFailEngine(e, "start");
                if (this.indexWriter != null) {
                    try {
                        IndexWriter pending = indexWriter;
                        indexWriter = null;
                        pending.rollback();
                    } catch (IOException e1) {
                       e.addSuppressed(e1);
                    }
                }
                throw new EngineCreationFailureException(shardId, "failed to create engine", e);
View Full Code Here

      PrintStream infoStream = iw.getInfoStream();
      if (infoStream != null && infoStream != System.out
          && infoStream != System.err) {
        infoStream.close();
      }
      iw.rollback();
      getRunData().setIndexWriter(null);
    }
    return 1;
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.