Package org.apache.lucene.store

Examples of org.apache.lucene.store.MockDirectoryWrapper.sync()


        Set<String> files = new HashSet<String>();
        for (String file : dir.listAll()) {
          dir.copy(dirCopy, file, file, IOContext.DEFAULT);
          files.add(file);
        }
        dirCopy.sync(files);
        // Have IW kiss the dir so we remove any leftover
        // files ... we can easily have leftover files at
        // the time we take a copy because we are holding
        // open a reader:
        new IndexWriter(dirCopy, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()))).close();
View Full Code Here


        Set<String> files = new HashSet<>();
        for (String file : dir.listAll()) {
          dir.copy(dirCopy, file, file, IOContext.DEFAULT);
          files.add(file);
        }
        dirCopy.sync(files);
        // Have IW kiss the dir so we remove any leftover
        // files ... we can easily have leftover files at
        // the time we take a copy because we are holding
        // open a reader:
        new IndexWriter(dirCopy, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()))).close();
View Full Code Here

      iw.addDocument(new Document());
      iw.close();
      IndexOutput output = dir.createOutput("_hello.world", IOContext.DEFAULT);
      output.writeString("i am unreferenced!");
      output.close();
      dir.sync(Collections.singleton("_hello.world"));
      dir.close();
    }
  }

  @Test
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.