Commits

Micha Kops committed 98e32b5

FSDirectory changed to RAMDirectory.

  • Participants
  • Parent commits 0b01c00

Comments (0)

Files changed (1)

src/main/java/com/hascode/tutorial/IndexUpdateByPrimaryKey.java

 package com.hascode.tutorial;
 
-import java.io.File;
 import java.io.IOException;
 
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.store.LockObtainFailedException;
+import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.Version;
 
 public class IndexUpdateByPrimaryKey {
 	public static void main(final String[] args) throws CorruptIndexException,
 			LockObtainFailedException, IOException {
-		Directory index = FSDirectory.open(new File("/tmp/index"));
+		Directory index = new RAMDirectory();
 		IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_35,
 				new StandardAnalyzer(Version.LUCENE_35));