• Get nodes from embedding IDs by using the EMAP relationship

    The EMAP edge table connects embedding_cache records to their corresponding code nodes (functions, modules, classes, etc). This function traverses those relationships to retrieve the actual node data.

    Parameters

    • db: Surreal

      SurrealDB instance

    • eids: string[]

      Array of embedding_cache record IDs (e.g., ["embedding_cache:abc123"])

    Returns Promise<NodeResult[]>

    Array of nodes containing the full code element data

    const nodes = await getNodesFromEmbeddingIds(db, ["embedding_cache:xyz", "embedding_cache:abc"]);