Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[opt](inverted index) Inverted Index Dictionary Compression #245

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

zzzxl1993
Copy link
Collaborator

No description provided.

@zzzxl1993
Copy link
Collaborator Author

run buildall

@@ -1383,7 +1388,7 @@ void IndexWriter::indexCompaction(std::vector<lucene::store::Directory *> &src_d
proxOutputList.push_back(proxOut);
// Instantiate a new termInfosWriter which will write in directory
// for the segment name segment using the new merged fieldInfos
TermInfosWriter *termInfosWriter = _CLNEW TermInfosWriter(dest_dir, segment.c_str(), fieldInfos, termIndexInterval);
auto* termInfosWriter = _CLNEW STermInfosWriter<char>(dest_dir, segment.c_str(), fieldInfos, termIndexInterval);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we change STermInfosWriter here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we have two types in clucene: STermInfosWriter and TermInfosWriter, I only modified the code logic in STermInfosWriter. My expectation is to maintain only one process within STermInfosWriter.

@@ -1879,7 +1884,8 @@ void IndexWriter::mergeTerms(bool hasProx, IndexVersion indexVersion) {
TermInfo termInfo;
termInfo.set(dfs[i], freqPointer, proxPointer, (int32_t) (skipPointer - freqPointer));
// Write a new TermInfo
termInfosWriter->add(smallestTerm, &termInfo);
std::string cur_term = lucene_wcstoutf8string(smallestTerm->text(), smallestTerm->textLength());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Find solution to avoid lucene_wcstoutf8string function call here.

@zzzxl1993 zzzxl1993 marked this pull request as draft November 6, 2024 07:32
@zzzxl1993 zzzxl1993 marked this pull request as ready for review November 26, 2024 07:00
@airborne12 airborne12 merged commit a506dbb into apache:clucene Nov 28, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants