run-llama/llama_index · error · NotImplementedError

get_nodes not implemented

Error message

get_nodes not implemented

What it means

`BaseVectorStore.get_nodes()` is a concrete-not-abstract convenience method on the base class: it exists so all stores share the signature, but only some integrations (e.g. Chroma, Qdrant) override it. Calling it on a store that never implemented node retrieval raises NotImplementedError. The async `aget_nodes()` simply delegates to it, so both paths fail identically.

Source

Thrown at llama-index-core/llama_index/core/vector_stores/types.py:352

class BasePydanticVectorStore(BaseComponent, ABC):
    """Abstract vector store protocol."""

    model_config = ConfigDict(arbitrary_types_allowed=True)
    stores_text: bool
    is_embedding_query: bool = True

    @property
    @abstractmethod
    def client(self) -> Any:
        """Get client."""

    def get_nodes(
        self,
        node_ids: Optional[List[str]] = None,
        filters: Optional[MetadataFilters] = None,
    ) -> List[BaseNode]:
        """Get nodes from vector store."""
        raise NotImplementedError("get_nodes not implemented")

    async def aget_nodes(
        self,
        node_ids: Optional[List[str]] = None,
        filters: Optional[MetadataFilters] = None,
    ) -> List[BaseNode]:
        """Asynchronously get nodes from vector store."""
        return self.get_nodes(node_ids, filters)

    @abstractmethod
    def add(
        self,
        nodes: Sequence[BaseNode],
        **kwargs: Any,
    ) -> List[str]:
        """Add nodes to vector store."""

    async def async_add(

View on GitHub (pinned to afd0fef371)

Solutions

  1. Check `type(store).get_nodes is BaseVectorStore.get_nodes` (or hasattr on the instance's class) before calling, and fall back to the docstore.
  2. Retrieve nodes via `index.docstore.get_nodes(node_ids)` when a docstore is attached.
  3. Switch to an integration that implements get_nodes if store-side node retrieval is a hard requirement.

Example fix

# before
nodes = any_store.get_nodes(node_ids=["a", "b"])  # NotImplementedError on many stores

# after
from llama_index.core.vector_stores import BaseVectorStore
if type(any_store).get_nodes is not BaseVectorStore.get_nodes:
    nodes = any_store.get_nodes(node_ids=["a", "b"])
else:
    nodes = index.docstore.get_nodes(["a", "b"]) or []
Defensive patterns

Strategy: fallback

Validate before calling

from llama_index.core.vector_stores import BaseVectorStore

def supports_get_nodes(store) -> bool:
    return type(store).get_nodes is not BaseVectorStore.get_nodes

Try / catch

try:
    nodes = store.get_nodes(node_ids=ids)
except NotImplementedError:
    nodes = index.docstore.get_nodes(ids) or []

Prevention

When it happens

Trigger: Calling `store.get_nodes(node_ids=[...])` or `await store.aget_nodes(...)` on a vector store integration that did not override the method (many community integrations, SimpleVectorStore, stores that only keep embeddings).

Common situations: Writing generic code against BaseVectorStore and assuming node retrieval is universally available; migrating between vector store backends where the old one supported get_nodes; building citation/reference features that need full node content from the store.

Related errors


AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15). Data as JSON: /api/errors/906c2e9fd363cd96. Report an issue: GitHub.