Skip to content

Passing nodes into VectorStoreIndex.fromDocuments is invalid. #2230

@wangmaoshu

Description

@wangmaoshu

Describe the bug
Passing nodes into VectorStoreIndex.fromDocuments is invalid.

To Reproduce
Passing in nodes has no effect, as the nodes passed in will be overwritten in the source code.

  const index =await VectorStoreIndex.fromDocuments(documents, {
    nodes: [...nodes], // No effect.
  });

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. macOS, Linux]
  • JS Runtime / Framework / Bundler (select all applicable)
  • Node.js
  • Deno
  • Bun
  • Next.js
  • ESBuild
  • Rollup
  • Webpack
  • Turbopack
  • Vite
  • Waku
  • Edge Runtime
  • AWS Lambda
  • Cloudflare Worker
  • Others (please elaborate on this)
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions