我正在尝试从HTML文件创建Lucene Index数据,但它抛出异常 实际上我想用密码加密我的lucene索引。还有其他选择吗?
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();
}