This is an automated email from the ASF dual-hosted git repository. jianliangqi pushed a commit to branch revert-149-clucene-2.0 in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
commit 7f4d3379d220c6bbff56c29f7285c8fc5a33fd85 Author: qiye <jianliang5...@gmail.com> AuthorDate: Thu Dec 14 16:23:44 2023 +0800 Revert "[fix](compile) fix clucene-2.0 compile error (#149)" This reverts commit c5e27ad6cd03dcbbb9d3c41ff6a5dfb05d05d33b. --- src/core/CLucene/index/TermInfosWriter.cpp | 16 ++++------------ src/core/CLucene/index/_TermInfosWriter.h | 3 +-- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/core/CLucene/index/TermInfosWriter.cpp b/src/core/CLucene/index/TermInfosWriter.cpp index d22f04c5..b6a45d7d 100644 --- a/src/core/CLucene/index/TermInfosWriter.cpp +++ b/src/core/CLucene/index/TermInfosWriter.cpp @@ -410,19 +410,11 @@ void TermInfosWriter::close() { //Func - Closes the TermInfosWriter //Pre - true //Post - The TermInfosWriter has been closed + if (output) { - if (FORMAT == -4) { - output->writeLong(size); - if (!isIndex) { - other->tisSize = size; - } else { - output->writeLong(tisSize); - } - } else { - //write size at start - //output->seek(4); // write size after format - output->writeLong(size);// do not seek now, directly write size at file footer - } + //write size at start + //output->seek(4); // write size after format + output->writeLong(size);// do not seek now, directly write size at file footer output->close(); _CLDELETE(output); diff --git a/src/core/CLucene/index/_TermInfosWriter.h b/src/core/CLucene/index/_TermInfosWriter.h index b2063f81..3acc2abe 100644 --- a/src/core/CLucene/index/_TermInfosWriter.h +++ b/src/core/CLucene/index/_TermInfosWriter.h @@ -73,8 +73,7 @@ private: FieldInfos *fieldInfos; CL_NS(store)::IndexOutput *output; TermInfo *lastTi; - int64_t size = 0; - int64_t tisSize = 0; + int64_t size; int64_t lastIndexPointer; bool isIndex; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org