This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch milvus-component in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5dc67d98bf4c2646fe06d43cdb9027b884903e26 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Fri Mar 15 12:04:54 2024 +0100 CAMEL-20485 - Create a Camel-Milvus component Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- .../src/main/docs/milvus-component.adoc | 43 +++++++ .../src/main/docs/qdrant-component.adoc | 134 --------------------- 2 files changed, 43 insertions(+), 134 deletions(-) diff --git a/components/camel-milvus/src/main/docs/milvus-component.adoc b/components/camel-milvus/src/main/docs/milvus-component.adoc new file mode 100644 index 00000000000..3cf3040b498 --- /dev/null +++ b/components/camel-milvus/src/main/docs/milvus-component.adoc @@ -0,0 +1,43 @@ += Qdrant Component +:doctitle: Qdrant +:shortname: qdrant +:artifactid: camel-qdrant +:description: Perform operations on the Qdrant Vector Database. +:since: 4.5 +:supportlevel: Preview +:tabs-sync-option: +:component-header: Only producer is supported +//Manually maintained attributes +:camel-spring-boot-name: qdrant + +*Since Camel {since}* + +*{component-header}* + +The Milvus Component provides support for interacting with the https://https://milvus.io/[Milvus Vector Database]. + +== URI format + +[source] +---- +milvus:collection[?options] +---- + +Where *collection* represents a named set of points (vectors with a payload) defined in your database. + + +// component-configure options: START + +// component-configure options: END + +// component options: START +include::partial$component-configure-options.adoc[] +include::partial$component-endpoint-options.adoc[] +// component options: END + +// endpoint options: START + +// endpoint options: END + + +include::spring-boot:partial$starter.adoc[] diff --git a/components/camel-milvus/src/main/docs/qdrant-component.adoc b/components/camel-milvus/src/main/docs/qdrant-component.adoc deleted file mode 100644 index 35a089ca5ad..00000000000 --- a/components/camel-milvus/src/main/docs/qdrant-component.adoc +++ /dev/null @@ -1,134 +0,0 @@ -= Qdrant Component -:doctitle: Qdrant -:shortname: qdrant -:artifactid: camel-qdrant -:description: Perform operations on the Qdrant Vector Database. -:since: 4.5 -:supportlevel: Preview -:tabs-sync-option: -:component-header: Only producer is supported -//Manually maintained attributes -:camel-spring-boot-name: qdrant - -*Since Camel {since}* - -*{component-header}* - -The Qdrant Component provides support for interacting with the https://qdrant.tech[Qdrant Vector Database]. - -== URI format - -[source] ----- -qdrant:collection[?options] ----- - -Where *collection* represents a named set of points (vectors with a payload) defined in your database. - - -// component-configure options: START - -// component-configure options: END - -// component options: START -include::partial$component-configure-options.adoc[] -include::partial$component-endpoint-options.adoc[] -// component options: END - -// endpoint options: START - -// endpoint options: END - - -== Collection Samples - -In the route below, we use the qdrant component to create a collection named _myCollection_ with the given parameters: - -[tabs] -==== -Java:: -+ -[source,java] ----- -from("direct:in") - .setHeader(Qdrant.Headers.ACTION) - .constant(QdrantAction.CREATE_COLLECTION) - .setBody() - .constant( - Collections.VectorParams.newBuilder() - .setSize(2) - .setDistance(Collections.Distance.Cosine).build()) - .to("qdrant:myCollection"); ----- -==== - -== Points Samples - -=== Upsert - -In the route below we use the qdrant component to perform insert + updates (upsert) on points in the collection named _myCollection_: - -[tabs] -==== -Java:: -+ -[source,java] ----- -from("direct:in") - .setHeader(Qdrant.Headers.ACTION) - .constant(QdrantAction.UPSERT) - .setBody() - .constant( - Points.PointStruct.newBuilder() - .setId(id(8)) - .setVectors(VectorsFactory.vectors(List.of(3.5f, 4.5f))) - .putAllPayload(Map.of( - "foo", value("hello"), - "bar", value(1))) - .build()) - .to("qdrant:myCollection"); ----- -==== - - -=== Retrieve - -In the route below, we use the qdrant component to retrieve information of a single point by id from the collection named _myCollection_: - -[tabs] -==== -Java:: -+ -[source,java] ----- -from("direct:in") - .setHeader(Qdrant.Headers.ACTION) - .constant(QdrantAction.RETRIEVE) - .setBody() - .constant(PointIdFactory.id(8)) - .to("qdrant:myCollection"); ----- -==== - - - -=== Delete - -In the route below, we use the qdrant component to delete points from the collection named `myCollection` according to a criteria: - -[tabs] -==== -Java:: -+ -[source,java] ----- -from("direct:in") - .setHeader(Qdrant.Headers.ACTION) - .constant(QdrantAction.DELETE) - .setBody() - .constant(ConditionFactory.matchKeyword("foo", "hello")) - .to("qdrant:myCollection"); ----- -==== - -include::spring-boot:partial$starter.adoc[]