> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Rust SDK NodeSets

> Node sets in cognee-rust: tags on ingested data and its DataPoints, used to scope search.

## What is a node set

A node set is a tag you attach to data when you add it. cognify passes the tag on to the DataPoints it builds from that data, so searches can be limited to it.

## How node sets work in Rust

A **node set** is a tag attached to ingested data and the DataPoints derived from
it, used to categorize and later scope the knowledge base. It is **partially
realized** in Rust today:

* **Tagging at ingest** — `add` accepts a `node_set`, stored on `Data.node_set`
  and under `external_metadata["node_set"]`, where cognify reads it and
  propagates it to derived DataPoints as `source_node_set`. Earlier versions
  wrote only the column, so data added with a node set was never tagged and
  `node_name` searches missed it; cognify now falls back to the column for those
  rows. Adding the same content again with a node set replaces its stored tags
  (without one, they are kept). Every name must be non-empty, and an item's own
  `external_metadata["node_set"]` must be a list of names or `null`; otherwise
  the whole `add` fails with `IngestionError::InvalidNodeSet` before anything is
  stored. The pipeline
  executor can attach `node_set` provenance to task outputs (`Tagged` /
  `TaggedMeta` in [`cognee-core`](https://github.com/topoteretes/cognee-rs/blob/main/crates/core/)).
* **Scoping** — a graph subset can be selected by node *type* and node *name*
  (the graph trait's `get_nodeset_subgraph`, used by search's node-name filter).
  The internal `persist_sessions` step tags cached session data with a fixed
  node set. Memify's `--node-type` / `--node-name` scoping went away with memify.

Note: this is type/name-based subgraph filtering rather than a fully general
named-node-set query surface; treat node sets as a tagging-and-scoping primitive,
not a finished feature.

## Related

> [card] [Recall](https://docs.cognee.ai/rust/core-concepts/main-operations/recall.md#scoping-by-node-name)
>
> Scope a recall by node name

> [card] [Add](https://docs.cognee.ai/rust/core-concepts/main-operations/legacy-operations/add.md)
>
> Tag data at ingest

> [card] [DataPoints](https://docs.cognee.ai/rust/core-concepts/building-blocks/datapoints.md)
>
> Where the tag is stored


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.