Skip to content

Commit

Permalink
fix field data delete values but not make length reset
Browse files Browse the repository at this point in the history
  • Loading branch information
amorynan committed Jun 4, 2024
1 parent 37a8a23 commit a7bcf89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/CLucene/index/SDocumentWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit a7bcf89

Please sign in to comment.