Reputation: 156
I have a working application on java 1.8, but I have to change this in java 1.6 because there are no:
import java.nio.file.Path;
import java.nio.file.Paths;
Path path = Paths.get(indexLocation); Directory index = FSDirectory.open(path);
I found old code example there was
Directory index=FSDirectory.open(new File(indexLocation));
But now .open()
needs Path as parameter. How to resolve this?
Upvotes: 0
Views: 356
Reputation: 598
If you have java 6 you must use Lucene library version < 4.8.
From Lucene 4.8, java 7 is required. This is the link of the system requirements: lucene 4.8 change log
Upvotes: 1