Skip to content

Create a method insertDocument(const std::string& docId, const std::string& text) #1

Description

@RKirlew

✅ Create a method insertDocument(const std::string& docId, const std::string& text) which:

Tokenizes the input text (you can split on whitespace).

Looks up word vectors from vectorStorage for each token.

Computes a mean-pooled vector.

Inserts the vector into the HNSW index (alg_hnsw->addPoint(...)).

Stores the mapping from docId → text (in a new std::unordered_map<std::string, std::string> or external file).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions