This is an automated email from the ASF dual-hosted git repository.
jianliangqi pushed a commit to branch clucene
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene by this push:
new 9f849a47f7 [fix] fix field data delete values but not make length
reset (#208)
9f849a47f7 is described below
commit 9f849a47f70625a57fedbaa1f5a6f89bc8f32967
Author: amory <[email protected]>
AuthorDate: Tue Apr 2 17:27:57 2024 +0800
[fix] fix field data delete values but not make length reset (#208)
---
src/core/CLucene/index/SDocumentWriter.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/core/CLucene/index/SDocumentWriter.cpp
b/src/core/CLucene/index/SDocumentWriter.cpp
index fa0f992349..4ff262f86d 100644
--- a/src/core/CLucene/index/SDocumentWriter.cpp
+++ b/src/core/CLucene/index/SDocumentWriter.cpp
@@ -135,7 +135,9 @@ void
SDocumentsWriter<T>::ThreadState::resetCurrentFieldData(Document *doc) {
numFieldData = 1;
// reset fp for new fields
fp->fieldCount = 0;
+ // delete values is not make length reset to 0, so resize can not make
sure new docFields values
fp->docFields.deleteValues();
+ fp->docFields.length = 0;
fp->docFields.resize(1);
for (int32_t i = 0; i < numDocFields; i++) {
Field *field = docFields[i];
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]