airborne12 commented on code in PR #242:
URL: https://github.com/apache/doris-thirdparty/pull/242#discussion_r1797694674


##########
src/core/CLucene/index/_SegmentHeader.h:
##########
@@ -86,6 +87,62 @@ class TermDocsBuffer {
   IndexVersion indexVersion_ = IndexVersion::kV0; 
 };
 
+class TermPostingsBuffer {

Review Comment:
   why we need this buffer? index input already has buffer inside.



##########
src/core/CLucene/index/IndexWriter.cpp:
##########
@@ -1308,20 +1309,36 @@ void 
IndexWriter::indexCompaction(std::vector<lucene::store::Directory *> &src_d
     }
     assert(readers.size() == numIndices);
 
-    // check hasProx
+    // check hasProx, indexVersion
     bool hasProx = false;
+    IndexVersion indexVersion = IndexVersion::kV1;
     {
         if (!readers.empty()) {
+            auto release_readers = [this]() {

Review Comment:
   why we release reader here?



##########
src/core/CLucene/util/PFORUtil.h:
##########
@@ -18,9 +18,22 @@
 
 #include <cstddef>
 #include <cstdint>
+#include <vector>
+
+#include "CLucene.h"
+#include "CLucene/store/IndexOutput.h"
+
+CL_NS_USE(store)
 
 size_t P4DEC(unsigned char *__restrict in, size_t n, uint32_t *__restrict out);
 size_t P4NZDEC(unsigned char *__restrict in, size_t n, uint32_t *__restrict 
out);
 size_t P4ENC(uint32_t *__restrict in, size_t n, unsigned char *__restrict out);
 size_t P4NZENC(uint32_t *__restrict in, size_t n, unsigned char *__restrict 
out);
 
+class PforUtil {
+public:
+    static constexpr size_t blockSize = 128;

Review Comment:
   why change block size to 128 from 512?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to