Skip to content

Camel-Qdrant: collect processors to be used as ref beans#21705

Open
smongiar wants to merge 1 commit intoapache:mainfrom
smongiar:add-qdrant-rag-features
Open

Camel-Qdrant: collect processors to be used as ref beans#21705
smongiar wants to merge 1 commit intoapache:mainfrom
smongiar:add-qdrant-rag-features

Conversation

@smongiar
Copy link
Contributor

@smongiar smongiar commented Mar 4, 2026

Description

Need to collect processors and beans for more comfortable usage in route DSL definitions. Some changes involve JBang as well to make it work with camel CLI

Target

  • [ X] I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

  • [ X] I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

@davsclaus davsclaus force-pushed the add-qdrant-rag-features branch from d203cef to cd5c037 Compare March 4, 2026 17:30
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@davsclaus
Copy link
Contributor

There are uncommitted changes
HEAD detached at pull/21705/merge
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/qdrant.json
modified: dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/QdrantEndpointBuilderFactory.java

@smongiar smongiar force-pushed the add-qdrant-rag-features branch from cd5c037 to b3b959b Compare March 5, 2026 09:23
Copy link
Contributor

@apupier apupier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand the link between the commit message and all the modifications.

the different modifications that would worth different commits/PR) that I understood are:

  • In the component, a parameter has been added for max results
  • some changes in jbang to look to src/main/resources for application.properties
  • specific Qdrant Processors

Comment on lines +34 to +41
Collections.Distance distanceEnum = switch (distance.toLowerCase()) {
case "cosine" -> Collections.Distance.Cosine;
case "euclid" -> Collections.Distance.Euclid;
case "dot" -> Collections.Distance.Dot;
case "manhattan" -> Collections.Distance.Manhattan;
default -> throw new IllegalArgumentException(
"Unknown distance metric: " + distance + ". Supported values: Cosine, Euclid, Dot, Manhattan");
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using RAGCreateCollection.valueOf()?
It would allow to work with new unit of distance if added later in the library

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good point. I wrongly assumed it's immutable. Let me try this. Thank you.

@davsclaus
Copy link
Contributor

There are uncommitted changes
HEAD detached at pull/21705/merge
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/qdrant.json
modified: dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/QdrantEndpointBuilderFactory.java

@smongiar smongiar force-pushed the add-qdrant-rag-features branch from b3b959b to c335258 Compare March 5, 2026 15:19
@smongiar smongiar force-pushed the add-qdrant-rag-features branch from c335258 to eeed803 Compare March 5, 2026 16:32
Copy link
Contributor

@davsclaus davsclaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have some commits for camel-jbang, this should not be included here when its about qdrant

@smongiar
Copy link
Contributor Author

smongiar commented Mar 5, 2026

I do not understand the link between the commit message and all the modifications.

the different modifications that would worth different commits/PR) that I understood are:

  • In the component, a parameter has been added for max results

Sure not mentioned in commit message, but useful to limit results during a vectorial search. I implemented an example that make use of it

  • some changes in jbang to look to src/main/resources for application.properties

Exactly. It was not mentioned in commit message, but it's in the PR description. Basically I tried to export a Qdrant example app with SB and Quarkus. Something like:

camel export --runtime=quarkus --gav=org.apache.camel.example:qdrant-rag-quarkus:1.0.0 --directory=./export-quarkus src/main/resources/camel/qdrant-rag.camel.yaml

I faced some issues, so I need to enforce application.properties check to avoid maven fallback

  • specific Qdrant Processors

That's mentioned in commit message

@davsclaus
Copy link
Contributor

please separate this and create a new JIRA about camel-jbang

@smongiar smongiar force-pushed the add-qdrant-rag-features branch from eeed803 to f391a04 Compare March 5, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants