use of org.apache.lucene.codecs.blocktreeords.BlockTreeOrdsPostingsFormat in project neo4j by neo4j.
the class IndexWriterConfigs method standard.
public static IndexWriterConfig standard() {
IndexWriterConfig writerConfig = new IndexWriterConfig(LuceneDataSource.KEYWORD_ANALYZER);
writerConfig.setMaxBufferedDocs(MAX_BUFFERED_DOCS);
writerConfig.setMaxBufferedDeleteTerms(MAX_BUFFERED_DELETE_TERMS);
writerConfig.setIndexDeletionPolicy(new MultipleBackupDeletionPolicy());
writerConfig.setUseCompoundFile(true);
writerConfig.setRAMBufferSizeMB(STANDARD_RAM_BUFFER_SIZE_MB);
writerConfig.setCodec(new Lucene54Codec() {
@Override
public PostingsFormat getPostingsFormatForField(String field) {
PostingsFormat postingFormat = super.getPostingsFormatForField(field);
return CODEC_BLOCK_TREE_ORDS_POSTING_FORMAT ? blockTreeOrdsPostingsFormat : postingFormat;
}
});
LogByteSizeMergePolicy mergePolicy = new LogByteSizeMergePolicy();
mergePolicy.setNoCFSRatio(MERGE_POLICY_NO_CFS_RATIO);
mergePolicy.setMinMergeMB(MERGE_POLICY_MIN_MERGE_MB);
mergePolicy.setMergeFactor(MERGE_POLICY_MERGE_FACTOR);
writerConfig.setMergePolicy(mergePolicy);
return writerConfig;
}
Aggregations