open-webui/backend/open_webui/retrieval/vector/dbs
Classic298 d03e9af0b7
perf: use the orjson codec to parse Oracle vector metadata (#27813)
`_json_to_metadata` parses the metadata of every result row returned by search and get. It now goes through `JSONCodec`, which selects orjson when `ENABLE_ORJSON` is set.

The text it parses is produced by Oracle's own `JSON_SERIALIZE`, and the column is a native `JSON` type, so the database normalises whatever was written and the reader never depends on the writer's escaping.

The matching `_metadata_to_json` write deliberately keeps stdlib `json`: it passes `default=self._decimal_handler`, orjson accepts none of stdlib's keyword arguments, and dropping the handler would turn a currently successful insert of a `Decimal` into a hard failure. The read side has no such constraint.

With `ENABLE_ORJSON` unset, which is the default, `JSONCodec` is stdlib `json` and this call site behaves exactly as before.
2026-07-31 17:31:14 -04:00
..
chroma.py refac 2026-07-27 03:50:18 -04:00
elasticsearch.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
mariadb_vector.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
milvus.py refac: use MilvusClient instead of deprecated ORM-style PyMilvus APIs (#27521) 2026-07-26 18:12:08 -04:00
milvus_multitenancy.py refac: use MilvusClient instead of deprecated ORM-style PyMilvus APIs (#27521) 2026-07-26 18:12:08 -04:00
opengauss.py chore: remove dead json imports (#27815) 2026-07-31 17:25:40 -04:00
opensearch.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
oracle23ai.py perf: use the orjson codec to parse Oracle vector metadata (#27813) 2026-07-31 17:31:14 -04:00
pgvector.py refac 2026-06-22 16:10:19 +02:00
pinecone.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
qdrant.py fix: delete Qdrant points by ID so memory deletions don't orphan vectors (#25495) 2026-06-01 14:13:46 -07:00
qdrant_multitenancy.py fix: delete Qdrant points by ID so memory deletions don't orphan vectors (#25495) 2026-06-01 14:13:46 -07:00
s3vector.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
valkey.py perf: use the orjson codec for Valkey vector metadata (#27805) 2026-07-31 17:24:57 -04:00
weaviate.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00