a guest Dec 15th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         StandardAnalyzer analyzer = new StandardAnalyzer();
  2.         IndexWriterConfig indexWriterConfig = new IndexWriterConfig(analyzer);
  3.         IndexWriter indexWriter =
  4.                 new IndexWriter(, indexWriterConfig);
  5.         for(Document doc : documents) {
  6.             indexWriter.addDocument(doc);
  7.         }
  8.         indexWriter.commit();
  9.         indexWriter.close();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand