[
https://issues.apache.org/jira/browse/CAMEL-24534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109205#comment-18109205
]
Claus Ibsen commented on CAMEL-24534:
-------------------------------------
Fixed via https://github.com/apache/camel/pull/25855 (commit 0757d655cf9e).
Resolving to sync JIRA status with the merged fix.
_Claude Code on behalf of Claus Ibsen_
> 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)