Remove key from metadata

Dear all,

I’ve put a dict like {“name”:“John”, “age”:18}. Is there any way I can remove the age key from the metadata. I tried the index.update(“id123”, set_metadata={“age”: None}) but it didn’t work.

Thanks & Regard,

1 Like

+1 for this as a feature. Since it’s not possible to store null / None values in pinecone metadata, it doesn’t seem feasible to nullify a previously set metadata key without resorting to dirty tricks like storing a hardcoded UUID in place. Either add support for null values or allow specify a delete_metadata set.

Brute force, while not pretty, might work:

  1. retrieve row,
  2. update metadata,
  3. index.upsert (wiping out old metadata).

Yeah true that’s another option, less ugly than my proposal, but also not ideal. Unsure of performance implication within pinecone, but at the very least sending all those vectors across the network seems needlessly wasteful.

Could someone from pinecone speak to the “idiomatic” way of handling this use case right now?