oscerd opened a new pull request, #25900:
URL: https://github.com/apache/camel/pull/25900

   ## Issue
   [CAMEL-24533](https://issues.apache.org/jira/browse/CAMEL-24533)
   
   ## Problem
   `WeaviateEmbeddingsDataTypeTransformer` builds the Weaviate write from the 
resolved parameters
   (`vectorFieldName`, `textFieldName`, `text`, ...), but on CREATE and 
UPDATE_BY_ID it only set the body
   to the embedding vector and, optionally, the id property:
   
   ```java
   message.setBody(embedding.vectorAsList(), List.class);
   if (ObjectHelper.isNotEmpty(keyValue) && ObjectHelper.isNotEmpty(keyName)) {
       HashMap<String, Object> maps = new HashMap<>();
       maps.put(keyName, keyValue);
       message.setHeader(WeaviateVectorDbHeaders.PROPERTIES, maps);
   }
   ```
   
   The embedded text (`text.text()`) was **never** written into the properties, 
so the original document
   text was silently discarded. In a RAG pipeline the vector store then cannot 
return the source passage
   that produced a match. The Milvus sibling transformer stores the text 
correctly — Weaviate was an
   incomplete port.
   
   ## Fix
   Write the text under `textFieldName` into the Weaviate object properties for 
CREATE and UPDATE_BY_ID
   (via a shared `setProperties` helper). Also correct the default-branch error 
message, which said only
   `create` and `updatebyid` were supported although `query` is handled as well.
   
   `textFieldName` is a resolved header value, so this is a pure logic change — 
no generated metadata is
   affected.
   
   ## Testing
   - New `WeaviateEmbeddingsDataTypeTransformerTest` asserts that CREATE and 
UPDATE_BY_ID write the text
     (under the default `text` field) and the id into the 
`CamelWeaviateProperties` map.
   - `mvn -Psourcecheck validate` green.
   
   _Claude Code on behalf of oscerd_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to