From a9480316e2802402d9e400a3a2bc1ae4886422b9 Mon Sep 17 00:00:00 2001 From: Zhang Chao <80152403@qq.com> Date: Fri, 26 Jan 2024 00:11:21 +0800 Subject: [PATCH] Improve Javadoc for Lucene90StoredFieldsFormat (#12984) --- .../lucene90/Lucene90StoredFieldsFormat.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90StoredFieldsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90StoredFieldsFormat.java index edb886b31c1..5646724546a 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90StoredFieldsFormat.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90StoredFieldsFormat.java @@ -37,21 +37,21 @@ import org.apache.lucene.util.packed.DirectMonotonicWriter; * *
This {@link StoredFieldsFormat} compresses blocks of documents in order to improve the * compression ratio compared to document-level compression. It uses the LZ4 compression algorithm by default in 16KB blocks, - * which is fast to compress and very fast to decompress data. Although the default compression - * method that is used ({@link Mode#BEST_SPEED BEST_SPEED}) focuses more on speed than on - * compression ratio, it should provide interesting compression ratios for redundant inputs (such as - * log files, HTML or plain text). For higher compression, you can choose ({@link + * href="http://code.google.com/p/lz4/">LZ4 compression algorithm by default in 8KB blocks and + * shared dictionaries, which is fast to compress and very fast to decompress data. Although the + * default compression method that is used ({@link Mode#BEST_SPEED BEST_SPEED}) focuses more on + * speed than on compression ratio, it should provide interesting compression ratios for redundant + * inputs (such as log files, HTML or plain text). For higher compression, you can choose ({@link * Mode#BEST_COMPRESSION BEST_COMPRESSION}), which uses the DEFLATE algorithm with 48kB blocks and shared + * href="http://en.wikipedia.org/wiki/DEFLATE">DEFLATE algorithm with 48KB blocks and shared * dictionaries for a better ratio at the expense of slower performance. These two options can be * configured like this: * *
* // the default: for high performance - * indexWriterConfig.setCodec(new Lucene87Codec(Mode.BEST_SPEED)); + * indexWriterConfig.setCodec(new Lucene99Codec(Mode.BEST_SPEED)); * // instead for higher performance (but slower): - * // indexWriterConfig.setCodec(new Lucene87Codec(Mode.BEST_COMPRESSION)); + * // indexWriterConfig.setCodec(new Lucene99Codec(Mode.BEST_COMPRESSION)); ** *
File formats @@ -61,9 +61,9 @@ import org.apache.lucene.util.packed.DirectMonotonicWriter; *
A fields data file (extension Notes
* .fdt
). This file stores a compact
- * representation of documents in compressed blocks of 16KB or more. When writing a segment,
+ * representation of documents in compressed blocks of 8KB or more. When writing a segment,
* documents are appended to an in-memory byte[]
buffer. When its size reaches
- * 16KB or more, some metadata about the documents is flushed to disk, immediately followed by
+ * 80KB or more, some metadata about the documents is flushed to disk, immediately followed by
* a compressed representation of the buffer using the LZ4 compression
@@ -71,10 +71,10 @@ import org.apache.lucene.util.packed.DirectMonotonicWriter;
*
*