Hello,
I am trying to experiment with my solr indexes with the patch open on Apache JIRA - Codec for index-level encryption <https://issues.apache.org/jira/browse/LUCENE-6966> (LUCENE-6966). https://issues.apache.org/jira/browse/LUCENE-6966. I am currently trying to test this Custom codec with Solr to encrypt sensitive documents. I have managed to apply this patch to Lucene-solr trunk (branch 6.3) and used “ant compile” and “ant jar” to get the jar files. As According to solr wiki, custom posting format can be plugged per field using SchemaCodecFactory. Here are some sample fields defined in my managedschema.xml <field name="description" type="text_general" indexed="true” stored="true"/> <field name="manufacturer" type="strings" indexed="true” stored="true"/> In order to use encryptedLucene50 posting format I have overridden posting format in field type definations. <fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true" *postingsFormat= "EncryptedLucene50"* /> <fieldType name="text_general" class="solr.TextField" multiValued="true" *postingsFormat= "EncryptedLucene50"*/> This all is working fine as desired because after indexing I get encrypted version of term dictionary and term indexes, but I would also like to encrypt the stored fields. I see this codec implementation is encrypting stored fields using Lucene default CompressingStoredFieldformat. and as mentioned in small documentation on this patch recently *“If the stored fields must be encrypted, the user has to specify with the method **‘storedFieldFormat()’ an instance of the EncryptedLucene50StoredFieldsFormat. This class is an abstract class itself, and user can specify which field to encrypt by overriding the method ‘isFieldEncrypted(String field) ”.* The DummyEncryptedLucene60Codec class provided with this patch already override the default stored field format with Encrypted version. However, I am unable to make use of this function with Solr. After indexing with solr stored fields are not encrypted in my index. My question is, what might be I am doing wrong here or am I missing any other thing so this function can also be picked and used with Solr? I will appreciate any feedback on this. Thanks. Mohit