use of org.apache.jackrabbit.core.query.lucene.directory.RAMDirectoryManager in project jackrabbit by apache.
the class IndexMigrationTest method testMigration.
public void testMigration() throws Exception {
List<Document> docs = new ArrayList<Document>();
docs.add(createDocument("ab", "a"));
docs.add(createDocument("a", "b"));
docs.add(createDocument("abcd", "c"));
docs.add(createDocument("abc", "d"));
DirectoryManager dirMgr = new RAMDirectoryManager();
PersistentIndex idx = new PersistentIndex("index", new StandardAnalyzer(Version.LUCENE_36), Similarity.getDefault(), new DocNumberCache(100), new IndexingQueue(new IndexingQueueStore(new RAMDirectory())), dirMgr, 0);
idx.addDocuments(docs.toArray(new Document[docs.size()]));
idx.commit();
IndexMigration.migrate(idx, dirMgr, SEP_CHAR);
}
Aggregations