This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new cb25c255f4c2 CAMEL-23832: camel-pgvector - improve the component and
option descriptions (#30975)
cb25c255f4c2 is described below
commit cb25c255f4c24abdcb749fcede027396bd9e903a
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Nov 27 14:56:07 2026 +0100
CAMEL-23832: camel-pgvector - improve the component and option descriptions
(#30975)
This commit rewrites the component description and the texts of 5 options
(collection, dataSource, dimension,
distanceType and the component configuration) and 5 headers of pgvector.
The old dimension and distanceType texts did
not say that dimension is read only by CREATE_TABLE, or that distanceType
also selects the operator class of the
HNSW index of CREATE_INDEX. The component configuration had the text "The
configuration;".
Documentation only, no behavior change. The component JSON, the catalog
copy, the doc page header and the DSL are
regenerated. camel-pgvector is marked as done in
tasks/component-descriptions.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---
.../apache/camel/catalog/components/pgvector.json | 28 ++++----
.../camel/catalog/docs/pgvector-component.adoc | 2 +-
.../apache/camel/component/pgvector/pgvector.json | 28 ++++----
.../src/main/docs/pgvector-component.adoc | 2 +-
.../component/pgvector/PgVectorComponent.java | 6 +-
.../component/pgvector/PgVectorConfiguration.java | 25 +++----
.../camel/component/pgvector/PgVectorEndpoint.java | 6 +-
.../camel/component/pgvector/PgVectorHeaders.java | 18 ++---
.../component/ComponentsBuilderFactory.java | 3 +-
.../dsl/PgvectorComponentBuilderFactory.java | 26 ++++++--
.../builder/endpoint/EndpointHeaderBuilders.java | 3 +-
.../builder/endpoint/StaticEndpointBuilders.java | 16 +++--
.../dsl/PgVectorEndpointBuilderFactory.java | 76 +++++++++++++++-------
tasks/component-descriptions.md | 2 +-
14 files changed, 146 insertions(+), 95 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pgvector.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pgvector.json
index 82a3bc35e737..66d0c771d675 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pgvector.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pgvector.json
@@ -3,7 +3,7 @@
"kind": "component",
"name": "pgvector",
"title": "PGVector",
- "description": "Perform operations on the PostgreSQL pgvector Vector
Database.",
+ "description": "Store, delete and search vector embeddings in a PostgreSQL
table with the pgvector extension.",
"deprecated": false,
"firstVersion": "4.19.0",
"label": "database,ai",
@@ -25,32 +25,32 @@
},
"componentProperties": {
"action": { "index": 0, "kind": "property", "displayName": "Action",
"group": "producer", "label": "producer", "required": false, "type": "enum",
"javaType": "org.apache.camel.component.pgvector.PgVectorAction", "enum": [
"CREATE_TABLE", "CREATE_INDEX", "DROP_TABLE", "UPSERT", "DELETE",
"SIMILARITY_SEARCH" ], "deprecated": false, "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration [...]
- "configuration": { "index": 1, "kind": "property", "displayName":
"Configuration", "group": "producer", "label": "", "required": false, "type":
"object", "javaType":
"org.apache.camel.component.pgvector.PgVectorConfiguration", "deprecated":
false, "autowired": false, "secret": false, "description": "The configuration;"
},
- "dataSource": { "index": 2, "kind": "property", "displayName": "Data
Source", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "javax.sql.DataSource", "deprecated": false, "autowired": true,
"secret": false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The DataSource to use
for connecting to the PostgreSQL database with pgvector extension." },
- "dimension": { "index": 3, "kind": "property", "displayName": "Dimension",
"group": "producer", "label": "producer", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 384, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The dimension of the
vectors to store." },
- "distanceType": { "index": 4, "kind": "property", "displayName": "Distance
Type", "group": "producer", "label": "producer", "required": false, "type":
"enum", "javaType": "org.apache.camel.component.pgvector.PgVectorDistanceType",
"enum": [ "COSINE", "EUCLIDEAN", "INNER_PRODUCT" ], "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "COSINE",
"configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", [...]
+ "configuration": { "index": 1, "kind": "property", "displayName":
"Configuration", "group": "producer", "label": "", "required": false, "type":
"object", "javaType":
"org.apache.camel.component.pgvector.PgVectorConfiguration", "deprecated":
false, "autowired": false, "secret": false, "description": "The configuration
shared by the endpoints of the component. Each endpoint uses a copy of it,
which its own options then change." },
+ "dataSource": { "index": 2, "kind": "property", "displayName": "Data
Source", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "javax.sql.DataSource", "deprecated": false, "autowired": true,
"secret": false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The javax.sql.DataSource
of the PostgreSQL database. The endpoint fails to start when no DataSource is
set o [...]
+ "dimension": { "index": 3, "kind": "property", "displayName": "Dimension",
"group": "producer", "label": "producer", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 384, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The number of dimensions
of the embedding column that CREATE_TABLE creates, as vector(n). It must [...]
+ "distanceType": { "index": 4, "kind": "property", "displayName": "Distance
Type", "group": "producer", "label": "producer", "required": false, "type":
"enum", "javaType": "org.apache.camel.component.pgvector.PgVectorDistanceType",
"enum": [ "COSINE", "EUCLIDEAN", "INNER_PRODUCT" ], "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "COSINE",
"configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", [...]
"lazyStartProducer": { "index": 5, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fail [...]
"autowiredEnabled": { "index": 6, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
},
"headers": {
- "CamelPgVectorAction": { "index": 0, "kind": "header", "displayName": "",
"group": "producer", "label": "", "required": false, "javaType": "String",
"enum": [ "CREATE_TABLE", "CREATE_INDEX", "DROP_TABLE", "UPSERT", "DELETE",
"SIMILARITY_SEARCH" ], "deprecated": false, "autowired": false, "secret":
false, "description": "The action to be performed.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#ACTION" },
- "CamelPgVectorRecordId": { "index": 1, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of the vector record.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#RECORD_ID" },
+ "CamelPgVectorAction": { "index": 0, "kind": "header", "displayName": "",
"group": "producer", "label": "", "required": false, "javaType": "String",
"enum": [ "CREATE_TABLE", "CREATE_INDEX", "DROP_TABLE", "UPSERT", "DELETE",
"SIMILARITY_SEARCH" ], "deprecated": false, "autowired": false, "secret":
false, "description": "The action that the producer performs. It replaces the
action option.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#ACTION" },
+ "CamelPgVectorRecordId": { "index": 1, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of the record, of at most 36 characters. UPSERT inserts the record with this
id or replaces it, and uses a random UUID when the header is not set. DELETE
requires it.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#RECORD_ID" },
"CamelPgVectorQueryTopK": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "Integer",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": "3",
"description": "The maximum number of results to return for similarity
search.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#QUERY_TOP_K" },
- "CamelPgVectorTextContent": { "index": 3, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
text content to store alongside the vector embedding.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#TEXT_CONTENT" },
- "CamelPgVectorMetadata": { "index": 4, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
metadata associated with the vector record, stored as JSON.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#METADATA" },
+ "CamelPgVectorTextContent": { "index": 3, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
text that UPSERT stores in the text_content column of the record.",
"constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#TEXT_CONTENT" },
+ "CamelPgVectorMetadata": { "index": 4, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
metadata that UPSERT stores in the metadata column of the record, a TEXT
column. The producer does not check the value; the pgvector:embeddings
transformer sets it as a JSON object.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#METADATA" },
"CamelPgVectorFilter": { "index": 5, "kind": "header", "displayName": "",
"group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description":
"Filter condition for similarity search. Applied as a SQL WHERE clause on the
text_content and metadata columns. Supports parameterized queries using ?
placeholders with values provided via the CamelPgVectorFilterParams header.
WARNING: When not using parameterized [...]
- "CamelPgVectorFilterParams": { "index": 6, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "java.util.List", "deprecated": false, "autowired": false,
"secret": false, "description": "Parameter values for parameterized filter
queries. Use with ? placeholders in the CamelPgVectorFilter header. Example:
filter = 'text_content LIKE ? AND metadata::jsonb->>'category' = ?' with
filterParams = List.of(%hello%, science).", "constantName": [...]
+ "CamelPgVectorFilterParams": { "index": 6, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "java.util.List", "deprecated": false, "autowired": false,
"secret": false, "description": "The values of the ? placeholders of the
CamelPgVectorFilter header, in order. For example the filter text_content LIKE
? AND metadata::jsonb->>'category' = ? with the List [%hello%, science]. The
producer reads it only when that header is set.", "cons [...]
},
"bodyTypes": {
"producerIn": { "carriers": [ "list", "null" ], "byOption": [ { "option":
"action", "value": "UPSERT", "carriers": [ "list" ] }, { "option": "action",
"value": "SIMILARITY_SEARCH", "carriers": [ "list" ] }, { "option": "action",
"value": "CREATE_TABLE", "carriers": [ "any" ] }, { "option": "action",
"value": "CREATE_INDEX", "carriers": [ "any" ] }, { "option": "action",
"value": "DROP_TABLE", "carriers": [ "any" ] }, { "option": "action", "value":
"DELETE", "carriers": [ "any" ] } ], [...]
"producerOut": { "carriers": [ "value", "text", "list" ], "byOption": [ {
"option": "action", "value": "CREATE_TABLE", "carriers": [ "value" ],
"javaType": "java.lang.Boolean" }, { "option": "action", "value":
"CREATE_INDEX", "carriers": [ "value" ], "javaType": "java.lang.Boolean" }, {
"option": "action", "value": "DROP_TABLE", "carriers": [ "value" ], "javaType":
"java.lang.Boolean" }, { "option": "action", "value": "DELETE", "carriers": [
"value" ], "javaType": "java.lang.Boolean" [...]
},
"properties": {
- "collection": { "index": 0, "kind": "path", "displayName": "Collection",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The collection (table) name" },
+ "collection": { "index": 0, "kind": "path", "displayName": "Collection",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The name of the table that holds the records.
It must be a plain SQL identifier of letters, digits and underscores that does
not start with a digit. CREATE_INDEX names the index after the table, followed
by _embedding_idx." },
"action": { "index": 1, "kind": "parameter", "displayName": "Action",
"group": "producer", "label": "producer", "required": false, "type": "enum",
"javaType": "org.apache.camel.component.pgvector.PgVectorAction", "enum": [
"CREATE_TABLE", "CREATE_INDEX", "DROP_TABLE", "UPSERT", "DELETE",
"SIMILARITY_SEARCH" ], "deprecated": false, "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuratio [...]
- "dataSource": { "index": 2, "kind": "parameter", "displayName": "Data
Source", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "javax.sql.DataSource", "deprecated": false, "autowired": true,
"secret": false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The DataSource to use
for connecting to the PostgreSQL database with pgvector extension." },
- "dimension": { "index": 3, "kind": "parameter", "displayName":
"Dimension", "group": "producer", "label": "producer", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 384, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The dimension of the
vectors to store." },
- "distanceType": { "index": 4, "kind": "parameter", "displayName":
"Distance Type", "group": "producer", "label": "producer", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.pgvector.PgVectorDistanceType", "enum": [ "COSINE",
"EUCLIDEAN", "INNER_PRODUCT" ], "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "COSINE", "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration" [...]
+ "dataSource": { "index": 2, "kind": "parameter", "displayName": "Data
Source", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "javax.sql.DataSource", "deprecated": false, "autowired": true,
"secret": false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The javax.sql.DataSource
of the PostgreSQL database. The endpoint fails to start when no DataSource is
set [...]
+ "dimension": { "index": 3, "kind": "parameter", "displayName":
"Dimension", "group": "producer", "label": "producer", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 384, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The number of dimensions
of the embedding column that CREATE_TABLE creates, as vector(n). It mus [...]
+ "distanceType": { "index": 4, "kind": "parameter", "displayName":
"Distance Type", "group": "producer", "label": "producer", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.pgvector.PgVectorDistanceType", "enum": [ "COSINE",
"EUCLIDEAN", "INNER_PRODUCT" ], "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "COSINE", "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration" [...]
"lazyStartProducer": { "index": 5, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produc [...]
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pgvector-component.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pgvector-component.adoc
index f3805a5546d6..7896b3670b10 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pgvector-component.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pgvector-component.adoc
@@ -2,7 +2,7 @@
:doctitle: PGVector
:shortname: pgvector
:artifactid: camel-pgvector
-:description: Perform operations on the PostgreSQL pgvector Vector Database.
+:description: Store, delete and search vector embeddings in a PostgreSQL table
with the pgvector extension.
:since: 4.19
:supportlevel: Stable
:tabs-sync-option:
diff --git
a/components/camel-ai/camel-pgvector/src/generated/resources/META-INF/org/apache/camel/component/pgvector/pgvector.json
b/components/camel-ai/camel-pgvector/src/generated/resources/META-INF/org/apache/camel/component/pgvector/pgvector.json
index 82a3bc35e737..66d0c771d675 100644
---
a/components/camel-ai/camel-pgvector/src/generated/resources/META-INF/org/apache/camel/component/pgvector/pgvector.json
+++
b/components/camel-ai/camel-pgvector/src/generated/resources/META-INF/org/apache/camel/component/pgvector/pgvector.json
@@ -3,7 +3,7 @@
"kind": "component",
"name": "pgvector",
"title": "PGVector",
- "description": "Perform operations on the PostgreSQL pgvector Vector
Database.",
+ "description": "Store, delete and search vector embeddings in a PostgreSQL
table with the pgvector extension.",
"deprecated": false,
"firstVersion": "4.19.0",
"label": "database,ai",
@@ -25,32 +25,32 @@
},
"componentProperties": {
"action": { "index": 0, "kind": "property", "displayName": "Action",
"group": "producer", "label": "producer", "required": false, "type": "enum",
"javaType": "org.apache.camel.component.pgvector.PgVectorAction", "enum": [
"CREATE_TABLE", "CREATE_INDEX", "DROP_TABLE", "UPSERT", "DELETE",
"SIMILARITY_SEARCH" ], "deprecated": false, "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration [...]
- "configuration": { "index": 1, "kind": "property", "displayName":
"Configuration", "group": "producer", "label": "", "required": false, "type":
"object", "javaType":
"org.apache.camel.component.pgvector.PgVectorConfiguration", "deprecated":
false, "autowired": false, "secret": false, "description": "The configuration;"
},
- "dataSource": { "index": 2, "kind": "property", "displayName": "Data
Source", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "javax.sql.DataSource", "deprecated": false, "autowired": true,
"secret": false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The DataSource to use
for connecting to the PostgreSQL database with pgvector extension." },
- "dimension": { "index": 3, "kind": "property", "displayName": "Dimension",
"group": "producer", "label": "producer", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 384, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The dimension of the
vectors to store." },
- "distanceType": { "index": 4, "kind": "property", "displayName": "Distance
Type", "group": "producer", "label": "producer", "required": false, "type":
"enum", "javaType": "org.apache.camel.component.pgvector.PgVectorDistanceType",
"enum": [ "COSINE", "EUCLIDEAN", "INNER_PRODUCT" ], "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "COSINE",
"configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", [...]
+ "configuration": { "index": 1, "kind": "property", "displayName":
"Configuration", "group": "producer", "label": "", "required": false, "type":
"object", "javaType":
"org.apache.camel.component.pgvector.PgVectorConfiguration", "deprecated":
false, "autowired": false, "secret": false, "description": "The configuration
shared by the endpoints of the component. Each endpoint uses a copy of it,
which its own options then change." },
+ "dataSource": { "index": 2, "kind": "property", "displayName": "Data
Source", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "javax.sql.DataSource", "deprecated": false, "autowired": true,
"secret": false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The javax.sql.DataSource
of the PostgreSQL database. The endpoint fails to start when no DataSource is
set o [...]
+ "dimension": { "index": 3, "kind": "property", "displayName": "Dimension",
"group": "producer", "label": "producer", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 384, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The number of dimensions
of the embedding column that CREATE_TABLE creates, as vector(n). It must [...]
+ "distanceType": { "index": 4, "kind": "property", "displayName": "Distance
Type", "group": "producer", "label": "producer", "required": false, "type":
"enum", "javaType": "org.apache.camel.component.pgvector.PgVectorDistanceType",
"enum": [ "COSINE", "EUCLIDEAN", "INNER_PRODUCT" ], "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "COSINE",
"configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", [...]
"lazyStartProducer": { "index": 5, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fail [...]
"autowiredEnabled": { "index": 6, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
},
"headers": {
- "CamelPgVectorAction": { "index": 0, "kind": "header", "displayName": "",
"group": "producer", "label": "", "required": false, "javaType": "String",
"enum": [ "CREATE_TABLE", "CREATE_INDEX", "DROP_TABLE", "UPSERT", "DELETE",
"SIMILARITY_SEARCH" ], "deprecated": false, "autowired": false, "secret":
false, "description": "The action to be performed.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#ACTION" },
- "CamelPgVectorRecordId": { "index": 1, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of the vector record.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#RECORD_ID" },
+ "CamelPgVectorAction": { "index": 0, "kind": "header", "displayName": "",
"group": "producer", "label": "", "required": false, "javaType": "String",
"enum": [ "CREATE_TABLE", "CREATE_INDEX", "DROP_TABLE", "UPSERT", "DELETE",
"SIMILARITY_SEARCH" ], "deprecated": false, "autowired": false, "secret":
false, "description": "The action that the producer performs. It replaces the
action option.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#ACTION" },
+ "CamelPgVectorRecordId": { "index": 1, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of the record, of at most 36 characters. UPSERT inserts the record with this
id or replaces it, and uses a random UUID when the header is not set. DELETE
requires it.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#RECORD_ID" },
"CamelPgVectorQueryTopK": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "Integer",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": "3",
"description": "The maximum number of results to return for similarity
search.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#QUERY_TOP_K" },
- "CamelPgVectorTextContent": { "index": 3, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
text content to store alongside the vector embedding.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#TEXT_CONTENT" },
- "CamelPgVectorMetadata": { "index": 4, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
metadata associated with the vector record, stored as JSON.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#METADATA" },
+ "CamelPgVectorTextContent": { "index": 3, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
text that UPSERT stores in the text_content column of the record.",
"constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#TEXT_CONTENT" },
+ "CamelPgVectorMetadata": { "index": 4, "kind": "header", "displayName":
"", "group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
metadata that UPSERT stores in the metadata column of the record, a TEXT
column. The producer does not check the value; the pgvector:embeddings
transformer sets it as a JSON object.", "constantName":
"org.apache.camel.component.pgvector.PgVectorHeaders#METADATA" },
"CamelPgVectorFilter": { "index": 5, "kind": "header", "displayName": "",
"group": "producer", "label": "", "required": false, "javaType": "String",
"deprecated": false, "autowired": false, "secret": false, "description":
"Filter condition for similarity search. Applied as a SQL WHERE clause on the
text_content and metadata columns. Supports parameterized queries using ?
placeholders with values provided via the CamelPgVectorFilterParams header.
WARNING: When not using parameterized [...]
- "CamelPgVectorFilterParams": { "index": 6, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "java.util.List", "deprecated": false, "autowired": false,
"secret": false, "description": "Parameter values for parameterized filter
queries. Use with ? placeholders in the CamelPgVectorFilter header. Example:
filter = 'text_content LIKE ? AND metadata::jsonb->>'category' = ?' with
filterParams = List.of(%hello%, science).", "constantName": [...]
+ "CamelPgVectorFilterParams": { "index": 6, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "java.util.List", "deprecated": false, "autowired": false,
"secret": false, "description": "The values of the ? placeholders of the
CamelPgVectorFilter header, in order. For example the filter text_content LIKE
? AND metadata::jsonb->>'category' = ? with the List [%hello%, science]. The
producer reads it only when that header is set.", "cons [...]
},
"bodyTypes": {
"producerIn": { "carriers": [ "list", "null" ], "byOption": [ { "option":
"action", "value": "UPSERT", "carriers": [ "list" ] }, { "option": "action",
"value": "SIMILARITY_SEARCH", "carriers": [ "list" ] }, { "option": "action",
"value": "CREATE_TABLE", "carriers": [ "any" ] }, { "option": "action",
"value": "CREATE_INDEX", "carriers": [ "any" ] }, { "option": "action",
"value": "DROP_TABLE", "carriers": [ "any" ] }, { "option": "action", "value":
"DELETE", "carriers": [ "any" ] } ], [...]
"producerOut": { "carriers": [ "value", "text", "list" ], "byOption": [ {
"option": "action", "value": "CREATE_TABLE", "carriers": [ "value" ],
"javaType": "java.lang.Boolean" }, { "option": "action", "value":
"CREATE_INDEX", "carriers": [ "value" ], "javaType": "java.lang.Boolean" }, {
"option": "action", "value": "DROP_TABLE", "carriers": [ "value" ], "javaType":
"java.lang.Boolean" }, { "option": "action", "value": "DELETE", "carriers": [
"value" ], "javaType": "java.lang.Boolean" [...]
},
"properties": {
- "collection": { "index": 0, "kind": "path", "displayName": "Collection",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The collection (table) name" },
+ "collection": { "index": 0, "kind": "path", "displayName": "Collection",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The name of the table that holds the records.
It must be a plain SQL identifier of letters, digits and underscores that does
not start with a digit. CREATE_INDEX names the index after the table, followed
by _embedding_idx." },
"action": { "index": 1, "kind": "parameter", "displayName": "Action",
"group": "producer", "label": "producer", "required": false, "type": "enum",
"javaType": "org.apache.camel.component.pgvector.PgVectorAction", "enum": [
"CREATE_TABLE", "CREATE_INDEX", "DROP_TABLE", "UPSERT", "DELETE",
"SIMILARITY_SEARCH" ], "deprecated": false, "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuratio [...]
- "dataSource": { "index": 2, "kind": "parameter", "displayName": "Data
Source", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "javax.sql.DataSource", "deprecated": false, "autowired": true,
"secret": false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The DataSource to use
for connecting to the PostgreSQL database with pgvector extension." },
- "dimension": { "index": 3, "kind": "parameter", "displayName":
"Dimension", "group": "producer", "label": "producer", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 384, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The dimension of the
vectors to store." },
- "distanceType": { "index": 4, "kind": "parameter", "displayName":
"Distance Type", "group": "producer", "label": "producer", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.pgvector.PgVectorDistanceType", "enum": [ "COSINE",
"EUCLIDEAN", "INNER_PRODUCT" ], "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "COSINE", "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration" [...]
+ "dataSource": { "index": 2, "kind": "parameter", "displayName": "Data
Source", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "javax.sql.DataSource", "deprecated": false, "autowired": true,
"secret": false, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The javax.sql.DataSource
of the PostgreSQL database. The endpoint fails to start when no DataSource is
set [...]
+ "dimension": { "index": 3, "kind": "parameter", "displayName":
"Dimension", "group": "producer", "label": "producer", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 384, "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration", "description": "The number of dimensions
of the embedding column that CREATE_TABLE creates, as vector(n). It mus [...]
+ "distanceType": { "index": 4, "kind": "parameter", "displayName":
"Distance Type", "group": "producer", "label": "producer", "required": false,
"type": "enum", "javaType":
"org.apache.camel.component.pgvector.PgVectorDistanceType", "enum": [ "COSINE",
"EUCLIDEAN", "INNER_PRODUCT" ], "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "COSINE", "configurationClass":
"org.apache.camel.component.pgvector.PgVectorConfiguration",
"configurationField": "configuration" [...]
"lazyStartProducer": { "index": 5, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produc [...]
}
}
diff --git
a/components/camel-ai/camel-pgvector/src/main/docs/pgvector-component.adoc
b/components/camel-ai/camel-pgvector/src/main/docs/pgvector-component.adoc
index f3805a5546d6..7896b3670b10 100644
--- a/components/camel-ai/camel-pgvector/src/main/docs/pgvector-component.adoc
+++ b/components/camel-ai/camel-pgvector/src/main/docs/pgvector-component.adoc
@@ -2,7 +2,7 @@
:doctitle: PGVector
:shortname: pgvector
:artifactid: camel-pgvector
-:description: Perform operations on the PostgreSQL pgvector Vector Database.
+:description: Store, delete and search vector embeddings in a PostgreSQL table
with the pgvector extension.
:since: 4.19
:supportlevel: Stable
:tabs-sync-option:
diff --git
a/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorComponent.java
b/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorComponent.java
index 363050f9d4ca..9a3ee475bdb0 100644
---
a/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorComponent.java
+++
b/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorComponent.java
@@ -27,7 +27,8 @@ import org.apache.camel.support.DefaultComponent;
@Component(PgVector.SCHEME)
public class PgVectorComponent extends DefaultComponent {
- @Metadata
+ @Metadata(description = "The configuration shared by the endpoints of the
component. Each endpoint uses a copy of it,"
+ + " which its own options then change.")
private PgVectorConfiguration configuration;
public PgVectorComponent() {
@@ -44,9 +45,6 @@ public class PgVectorComponent extends DefaultComponent {
return configuration;
}
- /**
- * The configuration;
- */
public void setConfiguration(PgVectorConfiguration configuration) {
this.configuration = configuration;
}
diff --git
a/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorConfiguration.java
b/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorConfiguration.java
index 3b012672fe2c..49a7a630fb89 100644
---
a/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorConfiguration.java
+++
b/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorConfiguration.java
@@ -34,17 +34,24 @@ public class PgVectorConfiguration implements Cloneable {
private PgVectorAction action;
@Metadata(autowired = true,
- description = "The DataSource to use for connecting to the
PostgreSQL database with pgvector extension.")
+ description = "The javax.sql.DataSource of the PostgreSQL
database. The endpoint fails to start when no"
+ + " DataSource is set or autowired. The producer
takes a new connection from it for each message,"
+ + " so a pooling DataSource is recommended.")
@UriParam
private DataSource dataSource;
@Metadata(label = "producer",
- description = "The dimension of the vectors to store.")
+ description = "The number of dimensions of the embedding column
that CREATE_TABLE creates, as vector(n). It"
+ + " must match the size of the vectors of the
embedding model, as PostgreSQL rejects a vector of"
+ + " another size. The other actions do not use
it.")
@UriParam(defaultValue = "384")
private int dimension = 384;
@Metadata(label = "producer",
- description = "The distance type to use for similarity search.")
+ description = "The distance function of SIMILARITY_SEARCH and of
the HNSW index that CREATE_INDEX creates:"
+ + " COSINE (cosine distance), EUCLIDEAN (L2
distance) or INNER_PRODUCT (the negative inner product,"
+ + " so the closest records have the lowest
distance). A search uses the index only when both use"
+ + " the same distance type.")
@UriParam(defaultValue = "COSINE")
private PgVectorDistanceType distanceType = PgVectorDistanceType.COSINE;
@@ -52,9 +59,6 @@ public class PgVectorConfiguration implements Cloneable {
return action;
}
- /**
- * The action to perform. The CamelPgVectorAction header, when set, wins
over this option.
- */
public void setAction(PgVectorAction action) {
this.action = action;
}
@@ -63,9 +67,6 @@ public class PgVectorConfiguration implements Cloneable {
return dataSource;
}
- /**
- * The DataSource to use for connecting to the PostgreSQL database with
pgvector extension.
- */
public void setDataSource(DataSource dataSource) {
this.dataSource = dataSource;
}
@@ -74,9 +75,6 @@ public class PgVectorConfiguration implements Cloneable {
return dimension;
}
- /**
- * The dimension of the vectors to store.
- */
public void setDimension(int dimension) {
this.dimension = dimension;
}
@@ -85,9 +83,6 @@ public class PgVectorConfiguration implements Cloneable {
return distanceType;
}
- /**
- * The distance type to use for similarity search. Supported values:
COSINE, EUCLIDEAN, INNER_PRODUCT.
- */
public void setDistanceType(PgVectorDistanceType distanceType) {
this.distanceType = distanceType;
}
diff --git
a/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorEndpoint.java
b/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorEndpoint.java
index aceac50c4720..a878a53723d2 100644
---
a/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorEndpoint.java
+++
b/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorEndpoint.java
@@ -33,7 +33,7 @@ import org.apache.camel.spi.UriPath;
import org.apache.camel.support.DefaultEndpoint;
/**
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table with the
pgvector extension.
*/
@UriEndpoint(
firstVersion = "4.19.0",
@@ -83,7 +83,9 @@ import org.apache.camel.support.DefaultEndpoint;
public class PgVectorEndpoint extends DefaultEndpoint {
@Metadata(required = true)
- @UriPath(description = "The collection (table) name")
+ @UriPath(description = "The name of the table that holds the records. It
must be a plain SQL identifier of letters,"
+ + " digits and underscores that does not start with
a digit. CREATE_INDEX names the index"
+ + " after the table, followed by _embedding_idx.")
private final String collection;
@UriParam
diff --git
a/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorHeaders.java
b/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorHeaders.java
index 627020c3f922..edf90701f50a 100644
---
a/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorHeaders.java
+++
b/components/camel-ai/camel-pgvector/src/main/java/org/apache/camel/component/pgvector/PgVectorHeaders.java
@@ -23,12 +23,13 @@ public final class PgVectorHeaders {
private PgVectorHeaders() {
}
- @Metadata(description = "The action to be performed.",
+ @Metadata(description = "The action that the producer performs. It
replaces the action option.",
javaType = "String",
enums =
"CREATE_TABLE,CREATE_INDEX,DROP_TABLE,UPSERT,DELETE,SIMILARITY_SEARCH")
public static final String ACTION = "CamelPgVectorAction";
- @Metadata(description = "The id of the vector record.",
+ @Metadata(description = "The id of the record, of at most 36 characters.
UPSERT inserts the record with this id or"
+ + " replaces it, and uses a random UUID when the
header is not set. DELETE requires it.",
javaType = "String")
public static final String RECORD_ID = "CamelPgVectorRecordId";
@@ -36,11 +37,13 @@ public final class PgVectorHeaders {
javaType = "Integer", defaultValue = "3")
public static final String QUERY_TOP_K = "CamelPgVectorQueryTopK";
- @Metadata(description = "The text content to store alongside the vector
embedding.",
+ @Metadata(description = "The text that UPSERT stores in the text_content
column of the record.",
javaType = "String")
public static final String TEXT_CONTENT = "CamelPgVectorTextContent";
- @Metadata(description = "The metadata associated with the vector record,
stored as JSON.",
+ @Metadata(description = "The metadata that UPSERT stores in the metadata
column of the record, a TEXT column. The"
+ + " producer does not check the value; the
pgvector:embeddings transformer sets it as a JSON"
+ + " object.",
javaType = "String")
public static final String METADATA = "CamelPgVectorMetadata";
@@ -54,10 +57,9 @@ public final class PgVectorHeaders {
javaType = "String")
public static final String FILTER = "CamelPgVectorFilter";
- @Metadata(description = "Parameter values for parameterized filter
queries."
- + " Use with ? placeholders in the
CamelPgVectorFilter header."
- + " Example: filter = 'text_content LIKE ? AND
metadata::jsonb->>'category' = ?'"
- + " with filterParams = List.of(\"%hello%\",
\"science\").",
+ @Metadata(description = "The values of the ? placeholders of the
CamelPgVectorFilter header, in order. For example the"
+ + " filter text_content LIKE ? AND
metadata::jsonb->>'category' = ? with the List"
+ + " [\"%hello%\", \"science\"]. The producer reads
it only when that header is set.",
javaType = "java.util.List")
public static final String FILTER_PARAMS = "CamelPgVectorFilterParams";
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index e1a8cb02530e..caab05451b9b 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -4282,7 +4282,8 @@ public interface ComponentsBuilderFactory {
}
/**
* PGVector (camel-pgvector)
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table with
the
+ * pgvector extension.
*
* Category: database,ai
* Since: 4.19
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/PgvectorComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/PgvectorComponentBuilderFactory.java
index 96fe7cb7b0e0..4697476fde89 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/PgvectorComponentBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/PgvectorComponentBuilderFactory.java
@@ -24,7 +24,8 @@ import org.apache.camel.builder.component.ComponentBuilder;
import org.apache.camel.component.pgvector.PgVectorComponent;
/**
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table with the
+ * pgvector extension.
*
* Generated by camel build tools - do NOT edit this file!
*/
@@ -33,7 +34,8 @@ public interface PgvectorComponentBuilderFactory {
/**
* PGVector (camel-pgvector)
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table with
the
+ * pgvector extension.
*
* Category: database,ai
* Since: 4.19
@@ -68,7 +70,8 @@ public interface PgvectorComponentBuilderFactory {
}
/**
- * The configuration;.
+ * The configuration shared by the endpoints of the component. Each
+ * endpoint uses a copy of it, which its own options then change.
*
* The option is a:
*
<code>org.apache.camel.component.pgvector.PgVectorConfiguration</code>
type.
@@ -84,8 +87,10 @@ public interface PgvectorComponentBuilderFactory {
}
/**
- * The DataSource to use for connecting to the PostgreSQL database with
- * pgvector extension.
+ * The javax.sql.DataSource of the PostgreSQL database. The endpoint
+ * fails to start when no DataSource is set or autowired. The producer
+ * takes a new connection from it for each message, so a pooling
+ * DataSource is recommended.
*
* The option is a: <code>javax.sql.DataSource</code> type.
*
@@ -101,7 +106,10 @@ public interface PgvectorComponentBuilderFactory {
/**
- * The dimension of the vectors to store.
+ * The number of dimensions of the embedding column that CREATE_TABLE
+ * creates, as vector(n). It must match the size of the vectors of the
+ * embedding model, as PostgreSQL rejects a vector of another size. The
+ * other actions do not use it.
*
* The option is a: <code>int</code> type.
*
@@ -118,7 +126,11 @@ public interface PgvectorComponentBuilderFactory {
/**
- * The distance type to use for similarity search.
+ * The distance function of SIMILARITY_SEARCH and of the HNSW index
that
+ * CREATE_INDEX creates: COSINE (cosine distance), EUCLIDEAN (L2
+ * distance) or INNER_PRODUCT (the negative inner product, so the
+ * closest records have the lowest distance). A search uses the index
+ * only when both use the same distance type.
*
* The option is a:
*
<code>org.apache.camel.component.pgvector.PgVectorDistanceType</code>
type.
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
index 1bf4dddecf1e..01392e766c5a 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
@@ -3508,7 +3508,8 @@ public class EndpointHeaderBuilders {
}
/**
* PGVector (camel-pgvector)
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table with
the
+ * pgvector extension.
*
* Category: database,ai
* Since: 4.19
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index ae468c416872..c5e1b973406d 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -14420,7 +14420,8 @@ public class StaticEndpointBuilders {
}
/**
* PGVector (camel-pgvector)
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table with
the
+ * pgvector extension.
*
* Category: database,ai
* Since: 4.19
@@ -14429,7 +14430,10 @@ public class StaticEndpointBuilders {
* Syntax: <code>pgvector:collection</code>
*
* Path parameter: collection (required)
- * The collection (table) name
+ * The name of the table that holds the records. It must be a plain SQL
+ * identifier of letters, digits and underscores that does not start with a
+ * digit. CREATE_INDEX names the index after the table, followed by
+ * _embedding_idx.
*
* @param path collection
* @return the dsl builder
@@ -14439,7 +14443,8 @@ public class StaticEndpointBuilders {
}
/**
* PGVector (camel-pgvector)
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table with
the
+ * pgvector extension.
*
* Category: database,ai
* Since: 4.19
@@ -14448,7 +14453,10 @@ public class StaticEndpointBuilders {
* Syntax: <code>pgvector:collection</code>
*
* Path parameter: collection (required)
- * The collection (table) name
+ * The name of the table that holds the records. It must be a plain SQL
+ * identifier of letters, digits and underscores that does not start with a
+ * digit. CREATE_INDEX names the index after the table, followed by
+ * _embedding_idx.
*
* @param componentName to use a custom component name for the endpoint
* instead of the default name
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PgVectorEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PgVectorEndpointBuilderFactory.java
index 3baaf4d90235..931328147f6e 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PgVectorEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PgVectorEndpointBuilderFactory.java
@@ -27,7 +27,8 @@ import org.apache.camel.builder.EndpointProducerBuilder;
import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
/**
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table with the
+ * pgvector extension.
*
* Generated by camel build tools - do NOT edit this file!
*/
@@ -77,8 +78,10 @@ public interface PgVectorEndpointBuilderFactory {
return this;
}
/**
- * The DataSource to use for connecting to the PostgreSQL database with
- * pgvector extension.
+ * The javax.sql.DataSource of the PostgreSQL database. The endpoint
+ * fails to start when no DataSource is set or autowired. The producer
+ * takes a new connection from it for each message, so a pooling
+ * DataSource is recommended.
*
* The option is a: <code>javax.sql.DataSource</code> type.
*
@@ -92,8 +95,10 @@ public interface PgVectorEndpointBuilderFactory {
return this;
}
/**
- * The DataSource to use for connecting to the PostgreSQL database with
- * pgvector extension.
+ * The javax.sql.DataSource of the PostgreSQL database. The endpoint
+ * fails to start when no DataSource is set or autowired. The producer
+ * takes a new connection from it for each message, so a pooling
+ * DataSource is recommended.
*
* The option will be converted to a <code>javax.sql.DataSource</code>
* type.
@@ -108,7 +113,10 @@ public interface PgVectorEndpointBuilderFactory {
return this;
}
/**
- * The dimension of the vectors to store.
+ * The number of dimensions of the embedding column that CREATE_TABLE
+ * creates, as vector(n). It must match the size of the vectors of the
+ * embedding model, as PostgreSQL rejects a vector of another size. The
+ * other actions do not use it.
*
* The option is a: <code>int</code> type.
*
@@ -123,7 +131,10 @@ public interface PgVectorEndpointBuilderFactory {
return this;
}
/**
- * The dimension of the vectors to store.
+ * The number of dimensions of the embedding column that CREATE_TABLE
+ * creates, as vector(n). It must match the size of the vectors of the
+ * embedding model, as PostgreSQL rejects a vector of another size. The
+ * other actions do not use it.
*
* The option will be converted to a <code>int</code> type.
*
@@ -138,7 +149,11 @@ public interface PgVectorEndpointBuilderFactory {
return this;
}
/**
- * The distance type to use for similarity search.
+ * The distance function of SIMILARITY_SEARCH and of the HNSW index
that
+ * CREATE_INDEX creates: COSINE (cosine distance), EUCLIDEAN (L2
+ * distance) or INNER_PRODUCT (the negative inner product, so the
+ * closest records have the lowest distance). A search uses the index
+ * only when both use the same distance type.
*
* The option is a:
*
<code>org.apache.camel.component.pgvector.PgVectorDistanceType</code>
@@ -155,7 +170,11 @@ public interface PgVectorEndpointBuilderFactory {
return this;
}
/**
- * The distance type to use for similarity search.
+ * The distance function of SIMILARITY_SEARCH and of the HNSW index
that
+ * CREATE_INDEX creates: COSINE (cosine distance), EUCLIDEAN (L2
+ * distance) or INNER_PRODUCT (the negative inner product, so the
+ * closest records have the lowest distance). A search uses the index
+ * only when both use the same distance type.
*
* The option will be converted to a
*
<code>org.apache.camel.component.pgvector.PgVectorDistanceType</code>
@@ -234,7 +253,8 @@ public interface PgVectorEndpointBuilderFactory {
public interface PgVectorBuilders {
/**
* PGVector (camel-pgvector)
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table
with
+ * the pgvector extension.
*
* Category: database,ai
* Since: 4.19
@@ -247,7 +267,8 @@ public interface PgVectorEndpointBuilderFactory {
}
/**
* PGVector (camel-pgvector)
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table
with
+ * the pgvector extension.
*
* Category: database,ai
* Since: 4.19
@@ -256,7 +277,10 @@ public interface PgVectorEndpointBuilderFactory {
* Syntax: <code>pgvector:collection</code>
*
* Path parameter: collection (required)
- * The collection (table) name
+ * The name of the table that holds the records. It must be a plain SQL
+ * identifier of letters, digits and underscores that does not start
+ * with a digit. CREATE_INDEX names the index after the table, followed
+ * by _embedding_idx.
*
* @param path collection
* @return the dsl builder
@@ -266,7 +290,8 @@ public interface PgVectorEndpointBuilderFactory {
}
/**
* PGVector (camel-pgvector)
- * Perform operations on the PostgreSQL pgvector Vector Database.
+ * Store, delete and search vector embeddings in a PostgreSQL table
with
+ * the pgvector extension.
*
* Category: database,ai
* Since: 4.19
@@ -275,7 +300,10 @@ public interface PgVectorEndpointBuilderFactory {
* Syntax: <code>pgvector:collection</code>
*
* Path parameter: collection (required)
- * The collection (table) name
+ * The name of the table that holds the records. It must be a plain SQL
+ * identifier of letters, digits and underscores that does not start
+ * with a digit. CREATE_INDEX names the index after the table, followed
+ * by _embedding_idx.
*
* @param componentName to use a custom component name for the endpoint
* instead of the default name
@@ -298,7 +326,7 @@ public interface PgVectorEndpointBuilderFactory {
public static final PgVectorHeaderNameBuilder INSTANCE = new
PgVectorHeaderNameBuilder();
/**
- * The action to be performed.
+ * The action that the producer performs. It replaces the action
option.
*
* The option is a: {@code String} type.
*
@@ -310,7 +338,9 @@ public interface PgVectorEndpointBuilderFactory {
return "CamelPgVectorAction";
}
/**
- * The id of the vector record.
+ * The id of the record, of at most 36 characters. UPSERT inserts the
+ * record with this id or replaces it, and uses a random UUID when the
+ * header is not set. DELETE requires it.
*
* The option is a: {@code String} type.
*
@@ -335,7 +365,7 @@ public interface PgVectorEndpointBuilderFactory {
return "CamelPgVectorQueryTopK";
}
/**
- * The text content to store alongside the vector embedding.
+ * The text that UPSERT stores in the text_content column of the
record.
*
* The option is a: {@code String} type.
*
@@ -347,7 +377,9 @@ public interface PgVectorEndpointBuilderFactory {
return "CamelPgVectorTextContent";
}
/**
- * The metadata associated with the vector record, stored as JSON.
+ * The metadata that UPSERT stores in the metadata column of the
record,
+ * a TEXT column. The producer does not check the value; the
+ * pgvector:embeddings transformer sets it as a JSON object.
*
* The option is a: {@code String} type.
*
@@ -377,10 +409,10 @@ public interface PgVectorEndpointBuilderFactory {
return "CamelPgVectorFilter";
}
/**
- * Parameter values for parameterized filter queries. Use with ?
- * placeholders in the CamelPgVectorFilter header. Example: filter =
- * 'text_content LIKE ? AND metadata::jsonb->>'category' = ?'
with
- * filterParams = List.of(%hello%, science).
+ * The values of the ? placeholders of the CamelPgVectorFilter header,
+ * in order. For example the filter text_content LIKE ? AND
+ * metadata::jsonb->>'category' = ? with the List [%hello%,
+ * science]. The producer reads it only when that header is set.
*
* The option is a: {@code java.util.List} type.
*
diff --git a/tasks/component-descriptions.md b/tasks/component-descriptions.md
index da5624302bd2..6d354276e640 100644
--- a/tasks/component-descriptions.md
+++ b/tasks/component-descriptions.md
@@ -304,7 +304,7 @@ or removes its row.
| camel-pdf | pdf | |
| camel-pg-replication-slot | pg-replication-slot | |
| camel-pgevent | pgevent | |
-| camel-pgvector | pgvector | |
+| camel-pgvector | pgvector | yes |
| camel-pinecone | pinecone | |
| camel-platform-http | platform-http | |
| camel-plc4x | plc4x | |