[
https://issues.apache.org/jira/browse/CAMEL-26285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-26285:
--------------------------------
Component/s: camel-weaviate
camel-neo4j
camel-ai
camel-milvus
camel-qdrant
> camel-milvus, camel-qdrant, camel-weaviate, camel-pgvector, camel-neo4j - add
> an action option instead of requiring a header, and give the Java type of
> each action in the catalog
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26285
> URL: https://issues.apache.org/jira/browse/CAMEL-26285
> Project: Camel
> Issue Type: Improvement
> Components: camel-ai, camel-catalog, camel-milvus, camel-neo4j,
> camel-qdrant, camel-weaviate
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> The vector database components milvus, qdrant, weaviate and pgvector, and
> neo4j, take the action only from a header ({{CamelMilvusAction}},
> {{CamelQdrantAction}}, {{CamelWeaviateAction}}, {{CamelPgVectorAction}},
> {{CamelNeo4jOperation}}), and the producer fails with
> {{NoSuchHeaderException("The action is a required header")}} without it.
> There is no endpoint option, so a route cannot write
> {{milvus:docs?action=SEARCH}}: it must set the header before every call.
> pinecone had the same design until CAMEL-21796 added an {{action}} option,
> with the header still winning ({{in.getHeader(ACTION,
> getConfiguration().getAction(), ...)}}).
> It also leaves the catalog body types (CAMEL-24961) without the Java type of
> each action. {{byOption}} gives the carriers and the fully qualified
> {{javaType}} per value of an option, but there is no option to key on, so
> milvus is {{pojo}} without a {{javaType}} on both sides, and its description
> names the SDK classes by their simple names only (CreateCollectionParam,
> InsertParam, SearchSimpleParam ... in; RpcStatus, MutationResult,
> SearchResponse, QueryResults out). The same for qdrant (VectorParams,
> PointStruct, PointId ... in; RetrievedPoint, ScoredPoint, CollectionInfo out)
> and weaviate (WeaviateObject, InsertManyResponse, QueryResponse ... out). The
> carriers depend on the action too, for pgvector and neo4j as well, so the
> catalog gives the union of all actions.
> *Proposed change*:
> # Add an {{action}} endpoint option to milvus, qdrant, weaviate and pgvector,
> and an {{operation}} option to neo4j, as pinecone has: the header, when set,
> wins over the option, and without both the producer fails as now.
> # Give their body types per value of the option with {{byOption}}: the
> carriers and the fully qualified {{javaType}} of each action, so tooling
> (validator, TUI, MCP) knows which SDK class an action takes and gives.
> h4. Check other components for the same design flaw
> Other components may also need a header to be used normally: an operation, an
> action or another value that is required, or reachable only, from a header
> and not from an endpoint option. These need the same check and fix. A first
> scan of the catalog, of the headers that select an operation only:
> * *required, no option*: milvus, qdrant, weaviate, pgvector, neo4j (this
> issue);
> * *a default, but the other operations only by header*: zookeeper
> ({{CamelZookeeperOperation}}: WRITE by default, DELETE by header only) and
> jcr ({{CamelJcrOperation}}: insert by default);
> * *fine*: azure-servicebus ({{producerOperation}}) and hazelcast
> ({{defaultOperation}}) have an option beside the header.
> The scan only looked at the headers that select an operation. Required
> headers that carry other values, such as an id or a key, still need checking.
> h4. Found while looking, not part of this issue
> Of the 270 component sides with the {{pojo}} carrier, 206 have no
> {{javaType}}. Apart from the components above:
> * *The option exists, the per-operation types are missing* (data only,
> {{byOption}} covers it today): aws-config, aws-security-hub, aws2-ecs,
> aws2-eks, aws2-eventbridge, aws2-iam, aws2-kms, aws2-mq, aws2-msk,
> aws2-redshift-data, aws2-rekognition, aws2-step-functions, aws2-sts,
> aws2-textract, aws2-timestream, aws2-transcribe, hwcloud-frs, stripe,
> ibm-watsonx-data, the openstack components, and some operations of docker,
> git, consul, dapr, elasticsearch, opensearch and the kubernetes components.
> * *The API components* select the method by two options, apiName and
> methodName, which {{byOption}} cannot key: as2, box, braintree, dhis2, fhir,
> google-calendar, google-drive, google-mail, google-sheets, olingo2, olingo4,
> twilio and zendesk. The return types are known from the generated API method
> classes, so the build could generate them.
> * *A class the user configures* (jpa and jooq entityType, grpc, thrift, cxf,
> mapstruct, optaplanner, stax, hazelcast, ignite, jgroups, vertx, salesforce
> and servicenow models): no {{javaType}} is right for these.
> Raised on the dev list in reply to the body types work: for a Java object,
> the fully qualified name is worth having, such as for milvus.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)