Claus Ibsen created CAMEL-27862:
-----------------------------------
Summary: camel-langchain4j-embeddingstore: a Filter header that is
not a Filter is ignored, a missing store gives NullPointerException
Key: CAMEL-27862
URL: https://issues.apache.org/jira/browse/CAMEL-27862
Project: Camel
Issue Type: Bug
Components: camel-langchain4j
Reporter: Claus Ibsen
Fix For: 4.25.0
Found while improving the option descriptions of
camel-langchain4j-embeddingstore for CAMEL-23832 (pull request
https://github.com/apache/camel/pull/31145).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. A Filter header that is not a Filter is ignored
{{LangChain4jEmbeddingStoreProducer}} remove()/search() read the header with
getHeader(FILTER, Filter.class), which is null for a String (no converter).
REMOVE then removes the body as a single id instead of the filtered delete;
SEARCH runs unfiltered.
Proposed change: fail when the header is present but not a Filter.
h4. 2. A missing store gives NullPointerException
With neither embeddingStore nor embeddingStoreFactory set, ADD, REMOVE and
SEARCH fail with a bare NullPointerException.
Proposed change: check in doStart with a clear message.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)