← All topics

Filtering & Querying · Topic 141

Filtering on dynamic metadata (Schemaless)

Dynamic or schemaless metadata means each point can have different attributes (e.g. different keys in a JSON payload) instead of a fixed schema. Filtering on such metadata requires the vector database to support arbitrary keys, range and equality on varied types, and often null or missing values. This flexibility is useful for evolving applications but can affect index design and performance compared to fixed-schema metadata filtering.

Summary

  • Dynamic/schemaless metadata: each point can have different attributes (e.g. varying keys in JSON payload). Filtering requires support for arbitrary keys, range/equality on varied types, and null or missing values.
  • Useful for evolving applications; can affect index design and performance vs. fixed-schema metadata filtering. VDBs may index dynamic fields differently; trade-offs vs. schema-on-write.
  • Boolean expressions over schemaless attributes depend on engine support; check docs for nested or variable keys. Pipeline: ingest with variable payloads, engine discovers or indexes keys, queries filter on dynamic keys. Practical tip: define frequently filtered keys explicitly when possible.

Dynamic metadata and indexing

In a schemaless or dynamic model, each point can have different attributes (e.g. varying keys in a JSON payload). The VDB must support arbitrary keys, equality and range on varied types, and null or missing values. Not all engines index every dynamic field; some build indexes on first discovery of a key, others require explicit schema or support only equality on dynamic fields.

Trade-off: flexibility helps evolving applications and heterogeneous points, but fixed-schema metadata is often easier to index and pre-filter. Pipeline: ingest points with variable payloads → engine may discover keys and build indexes or apply schema-on-read → queries filter on dynamic keys; support for nested or variable paths varies.

Boolean expressions and performance

Boolean expressions over schemaless attributes depend on engine support; check docs for nested or variable keys. Some systems require known fields for efficient indexing; others allow ad-hoc filters on any key with potential full scan. Performance can be worse than fixed-schema when indexes are built lazily or not at all for rare keys.

Practical tip: if you need to filter often on certain keys, define them explicitly or use a hybrid schema (fixed core + optional dynamic). See your VDB docs for schemaless indexing and secondary indexes on dynamic fields.

Frequently Asked Questions

What is schemaless or dynamic metadata?

Each point can have different attributes (e.g. different keys in a JSON payload) instead of a fixed schema. The VDB must support arbitrary keys, range and equality on varied types, and null or missing values.

When should I use dynamic metadata?

When your application schema evolves or different points have different attribute sets. Trade-off: flexibility vs. index design and performance; fixed-schema metadata filtering is often easier to index and pre-filter.

Can I use boolean expressions on schemaless fields?

Support varies by VDB. Check docs for boolean expressions over dynamic or nested keys. Some engines require known fields for indexing.

How do VDBs index dynamic fields?

Implementation varies: some build indexes on discovery of keys; others require explicit schema or handle only equality on dynamic fields. See your VDB docs for schemaless indexing and secondary indexes.