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

Add new --append option to IndexBuilder to support adding new items to an existing index #58

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MaJaHa95
Copy link

From what I can tell, there's no ability with the CLI to append data onto an existing index; running IndexBuilder starts afresh.

This PR adds an --append parameter to IndexBuilder, which attempts to load an existing index, and calls the VectorIndex::AddIndex function if it already exists.

I'm pretty new to C++ (from C#, so look out), so there are some changes I'm not totally confident about. But it seems pretty simple.

@msftclas
Copy link

msftclas commented May 30, 2019

CLA assistant check
All CLA requirements met.

code = indexBuilder->BuildIndex(vectorReader->GetVectorSet(), vectorReader->GetMetadataSet());
indexBuilder->SaveIndex(options->m_outputFolder);

p_vectorSet = vectorReader->GetVectorSet();
Copy link
Author

@MaJaHa95 MaJaHa95 May 30, 2019

Choose a reason for hiding this comment

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

Is there an issue with using the out-of-scope vectorReader here? I wasn't sure about the lifetime of it, whether there could be an issue. Again, new to all this.

@microsoft-github-updates microsoft-github-updates bot changed the base branch from master to main January 10, 2022 04:52
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.

2 participants