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

LUCENE-10057: Use Lucene abstractions to store KnnVectorDict #252

Merged
merged 3 commits into from Aug 19, 2021

Conversation

msokolov
Copy link
Contributor

No description provided.

@msokolov msokolov requested a review from dweiss August 19, 2021 16:00
@uschindler
Copy link
Contributor

This looks very well, now the dict file is created using IndexOutput and read in using IndexInput. And it is also stored in index directory. I am not sure if storing in index directory is the best idea, because it is not part of segmentinfos, so the index itsself does not know about the file.

But when this gets improved maybe we have a standard FST format available that is "officially part of index".

Copy link
Contributor

@dweiss dweiss left a comment

Choose a reason for hiding this comment

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

Thanks Mike.

@@ -153,6 +163,10 @@ public static void main(String[] args) throws Exception {
// you're done adding documents to it):
//
// writer.forceMerge(1);
} finally {
if (vectorDictInstance != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

IOUtils.close(vararg) can deal with null entries so you can omit the if here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah I didn't realize, thanks I'll change that and push

@msokolov msokolov closed this Aug 19, 2021
@msokolov msokolov reopened this Aug 19, 2021
@msokolov msokolov merged commit 5896e53 into apache:main Aug 19, 2021
@msokolov msokolov deleted the LUCENE-10057 branch August 19, 2021 20:14
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.

None yet

3 participants