You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/08/28 11:56:00 UTC
[jira] [Resolved] (CAMEL-24534) camel-qdrant: the embeddings data-type transformer casts every metadata value to String
[ https://issues.apache.org/jira/browse/CAMEL-24534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-24534.
---------------------------------
Resolution: Fixed
> camel-qdrant: the embeddings data-type transformer casts every metadata value to String
> ---------------------------------------------------------------------------------------
>
> Key: CAMEL-24534
> URL: https://issues.apache.org/jira/browse/CAMEL-24534
> Project: Camel
> Issue Type: Bug
> Components: camel-qdrant
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.23.0
>
>
> QdrantEmbeddingsDataTypeTransformer (around lines 56-58) maps document metadata into the Qdrant point payload with:
> metadata.toMap().forEach((k, v) -> builder.putPayload(k, ValueFactory.value((String) v)));
> The unchecked (String) v cast throws ClassCastException as soon as a metadata value is not a String. This happens routinely in practice because langchain4j document splitters populate numeric metadata such as the chunk index and page number, so a normal ingestion pipeline that stores metadata will fail at runtime.
> The pgvector sibling transformer handles Number/Boolean values in addition to String. Fix: branch on the value type (String / Number / Boolean) and build the matching Qdrant Value via ValueFactory, or fall back to String.valueOf(v) for unknown types.
> _Claude Code on behalf of oscerd_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)