Skip to main content
CyborgDB supports metadata tagging and filtering, enabling fine-grained search filters in addition to encrypted vector search. Metadata, like vectors, are end-to-end encrypted and never exposed in plaintext outside of the client.

Supported Metadata

The following metadata types are supported:
  • Boolean
  • String
  • List of strings
  • Numbers (will be stored as fp64)

Adding Items with Metadata

To add items with metadata tags, you can pass a dictionary of key-value pairs to the metadata field during upsert:
This metadata will be encrypted and stored in the index.
Metadata field names and string values are case-sensitive. Ensure that the metadata field names and values are consistent when filtering queries.

Filtering Queries with Metadata

CyborgDB supports a subset of MongoDB’s Query and Projection Operators. For more details, see Metadata Query Operators To filter a query with metadata, you can pass a dictionary of filters to the filters field during query:

Metadata Indexing

By default, every metadata field is indexed using encrypted indexing, so filters on indexed fields are resolved from the index and are fast. You can opt individual fields out of indexing with metadata_schema at index creation (see Metadata schema). Filters on non-indexed fields still work, but they are evaluated after decryption and are slower, as are $regex / $contains filters on fields not indexed for pattern matching.

Metadata Query Operators

CyborgDB supports a subset of MongoDB’s Query and Projection Operators. Specifically, the following operators are supported: