Skip to content

Missing vector search index creation in seed database #1

Open
@pmosconi

Description

@pmosconi

Hi,
thanks for the sample project.
I believe that seed-database.ts should contain the vector search index creation (at the end):

    // define Atlas Vector Search index
    const index = {
      name: "vector_index",
      type: "vectorSearch",
      definition: {
        fields: [
          {
            type: "vector",
            numDimensions: 1536,
            path: "embedding",
            similarity: "cosine"
          },
        ]
      }
    };
    await collection.createSearchIndex(index);
    console.log("Database vector index created");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions