Jiri Ondrusek created CAMEL-26342:
-------------------------------------

             Summary: camel-langchain4j-ingest: expose the includeId/excludeId 
pattern matching for reuse
                 Key: CAMEL-26342
                 URL: https://issues.apache.org/jira/browse/CAMEL-26342
             Project: Camel
          Issue Type: Improvement
          Components: camel-ai
            Reporter: Jiri Ondrusek
            Assignee: Jiri Ondrusek


The {{includeId}}/{{excludeId}} matching lives in two private methods of 
{{LangChain4jIngestProducer}}: {{parsePatterns}} (comma-separated Ant patterns, 
blank means none) and {{idAccepted}} (exclusion wins; with {{includeId}} set, 
only matching ids pass).

Code that parses a document before the producer sees it cannot reuse them. The 
Camel Quarkus ingest extension builds pipelines that run a parser (Tika, 
Docling) first, and wants to apply the same id filter before the parse, so a 
filtered document is never read or parsed. Today it has to re-implement the 
semantics, which can drift from the component.

Proposal: move the two methods into a small public helper in 
{{camel-langchain4j-ingest}} (for example {{IngestIdFilter}} with 
{{of(includeId, excludeId)}} and {{accepts(documentId)}}) and let the producer 
use it. No behaviour change.

Found while reviewing the Camel Quarkus ingest extension (CAMEL-QUARKUS pull 
request 9340).

_Generated with [Claude Code|https://claude.com/claude-code] on behalf of 
[~jondruse]_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to