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

   # Description
   
   Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). 
The umbrella ticket stays open.
   
   ## Summary
   
   Rewrites the component description, the texts of 7 options (6 of them also 
component options) and of 6 headers of
   spring-ai-vector-store. The old texts were short labels ("The id", "The 
configuration.", "Filter expression for
   metadata-based filtering") that did not say what an operation does, which 
header replaces which option, or which values
   are accepted. The new texts give the four operations, the header that 
replaces each option, the range that Spring AI
   checks for topK (not negative) and similarityThreshold (0 to 1, where 0.0 
accepts all), and the portable filter
   expression syntax of Spring AI. The storeId text now says that the component 
uses it only to tell endpoints apart.
   The texts that were already clear (searchByVector, the upsert id headers, 
the two count headers) are unchanged.
   
   Sources: the Camel code of the component (`SpringAiVectorStoreProducer`, 
`SpringAiVectorStoreConfiguration`,
   `SpringAiVectorStoreHeaders`) and Spring AI 2.1.0 (`SearchRequest.Builder`, 
`FilterExpressionTextParser`).
   
   ### Found, not changed
   
   - The options operation, topK, similarityThreshold, filterExpression and 
searchByVector have no `producer` label, and
     the headers have no label either (the component is producer only).
   - The default topK of the component is 5, while the default of Spring AI 
`SearchRequest` is 4.
   - ADD of a `float[]` body (after spring-ai-embeddings) puts the vector into 
the `embedding` and `precomputed_embedding`
     metadata of the document. The vector stores of Spring AI do not use it: 
they embed the text again, and they store the
     `float[]` as metadata. UPSERT is the operation that writes the vector as 
it is.
   - DELETE without document ids fails in any case; when a filterExpression 
(option or header) is set, it fails with an
     `UnsupportedOperationException` instead of an `IllegalArgumentException`, 
so the filterExpression option, meant for
     SIMILARITY_SEARCH, changes the error of DELETE.
   
   ## Tests
   
   - There is no new test, as only description text changes.
   - A script compared the component JSON with the parent commit: only 
`description` fields changed (19 texts: the
     component, 6 component options, 6 endpoint options, 6 headers).
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I ran the formatter and built the module, then regenerated the catalog 
copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all 
generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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