Guest User

LireCustomCodec for Lucene

a guest
Jun 24th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. public final class LireCustomCodec extends FilterCodec {
  2.  
  3.     public LireCustomCodec() {
  4.         super("LireCustomCodec", new Lucene42Codec());
  5.     }
  6.  
  7.     @Override
  8.     public StoredFieldsFormat storedFieldsFormat() {
  9.         return new LireFeatureStoredFieldFormat();
  10.     }
  11.  
  12. }
  13.  
  14. // --- and ---
  15.  
  16. public final class LireFeatureStoredFieldFormat extends CompressingStoredFieldsFormat {
  17.  
  18.     /**
  19.      * Sole constructor.
  20.      */
  21.     public LireFeatureStoredFieldFormat() {
  22.         // TODO: try different chunk sizes, maybe 1-2KB?
  23.         super("LireFeatureStoredFieldFormat", CompressionMode.FAST, 1 * 4096);
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment