I am trying to create Lucene Index data from HTML files but its throwing an exception actually i want to encrypt my lucene index with password . Is there any other alternative?
try{
File outputdir=new File("path upto output directory");
byte[] salt = new byte[16];
String password = "lucenetransform";
DataEncryptor enc = new DataEncryptor("AES/ECB/PKCS5Padding", password, salt, 128,false);
DataDecryptor dec = new DataDecryptor(password, salt,false);
IndexWriter indexwriter=new IndexWriter(new TransformedDirectory(FSDirectory.open(outputdir), enc, dec), new StandardAnalyzer(Version.LUCENE_36),true, IndexWriter.MaxFieldLength.LIMITED);
}
catch(Exception ex)
{
ex.printStackTrace();
}