[
https://issues.apache.org/jira/browse/CAMEL-27796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27796:
--------------------------------
Description:
Found while improving the option descriptions of camel-weaviate for CAMEL-23832
(commit
https://github.com/apache/camel/commit/8a5ecaf41ffca0f81f3d680155485d5214951a59,
pull request https://github.com/apache/camel/pull/31137).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. scheme=https without a port uses 8080 and 50051
{{WeaviateVectorDbEndpoint.createClient}} calls httpPort/grpcPort after
{{Config.Custom.scheme()}}, which overrides the library's defaults of 443 for
https. Weaviate Cloud (443/443) needs host=x:443 and grpcPort=443 set
explicitly.
Proposed change: set the ports only when the user gave them.
h4. 2. host with a scheme or an IPv6 address fails
The host is split on ":" and parts[1] is parsed as an int, so "http://h:8080"
throws NumberFormatException and IPv6 breaks.
Proposed change: strip the scheme first and split on the last ":".
h4. 3. UPDATE_BY_ID always needs a vector, and without merge removes all
properties
{{WeaviateVectorDbProducer.updateById}} always requires a vector body, so a
properties-only update is impossible. With UpdateWithMerge=false and no
properties header it sends PUT with an empty map, which removes every property
of the object.
h4. 4. Embeddings transformer
The QUERY branch of {{WeaviateEmbeddingsDataTypeTransformer}} writes the
key/value into CamelWeaviateProperties, which the QUERY action never reads. The
default key name "id" is a reserved property name in Weaviate (not tested
against a server), so CamelWeaviateKeyValue without CamelWeaviateKeyName
probably fails on CREATE.
h4. 5. grpcPort=null gives an NPE
Unboxing in createClient (minor).
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of camel-weaviate for CAMEL-23832
(pull request https://github.com/apache/camel/pull/31137).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. scheme=https without a port uses 8080 and 50051
{{WeaviateVectorDbEndpoint.createClient}} calls httpPort/grpcPort after
{{Config.Custom.scheme()}}, which overrides the library's defaults of 443 for
https. Weaviate Cloud (443/443) needs host=x:443 and grpcPort=443 set
explicitly.
Proposed change: set the ports only when the user gave them.
h4. 2. host with a scheme or an IPv6 address fails
The host is split on ":" and parts[1] is parsed as an int, so "http://h:8080"
throws NumberFormatException and IPv6 breaks.
Proposed change: strip the scheme first and split on the last ":".
h4. 3. UPDATE_BY_ID always needs a vector, and without merge removes all
properties
{{WeaviateVectorDbProducer.updateById}} always requires a vector body, so a
properties-only update is impossible. With UpdateWithMerge=false and no
properties header it sends PUT with an empty map, which removes every property
of the object.
h4. 4. Embeddings transformer
The QUERY branch of {{WeaviateEmbeddingsDataTypeTransformer}} writes the
key/value into CamelWeaviateProperties, which the QUERY action never reads. The
default key name "id" is a reserved property name in Weaviate (not tested
against a server), so CamelWeaviateKeyValue without CamelWeaviateKeyName
probably fails on CREATE.
h4. 5. grpcPort=null gives an NPE
Unboxing in createClient (minor).
_Claude Code on behalf of davsclaus_
> camel-weaviate: https keeps ports 8080/50051, host with scheme or IPv6 fails,
> update without merge removes all properties
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27796
> URL: https://issues.apache.org/jira/browse/CAMEL-27796
> Project: Camel
> Issue Type: Bug
> Components: camel-weaviate
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-weaviate for
> CAMEL-23832 (commit
> https://github.com/apache/camel/commit/8a5ecaf41ffca0f81f3d680155485d5214951a59,
> pull request https://github.com/apache/camel/pull/31137).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. scheme=https without a port uses 8080 and 50051
> {{WeaviateVectorDbEndpoint.createClient}} calls httpPort/grpcPort after
> {{Config.Custom.scheme()}}, which overrides the library's defaults of 443 for
> https. Weaviate Cloud (443/443) needs host=x:443 and grpcPort=443 set
> explicitly.
> Proposed change: set the ports only when the user gave them.
> h4. 2. host with a scheme or an IPv6 address fails
> The host is split on ":" and parts[1] is parsed as an int, so "http://h:8080"
> throws NumberFormatException and IPv6 breaks.
> Proposed change: strip the scheme first and split on the last ":".
> h4. 3. UPDATE_BY_ID always needs a vector, and without merge removes all
> properties
> {{WeaviateVectorDbProducer.updateById}} always requires a vector body, so a
> properties-only update is impossible. With UpdateWithMerge=false and no
> properties header it sends PUT with an empty map, which removes every
> property of the object.
> h4. 4. Embeddings transformer
> The QUERY branch of {{WeaviateEmbeddingsDataTypeTransformer}} writes the
> key/value into CamelWeaviateProperties, which the QUERY action never reads.
> The default key name "id" is a reserved property name in Weaviate (not tested
> against a server), so CamelWeaviateKeyValue without CamelWeaviateKeyName
> probably fails on CREATE.
> h4. 5. grpcPort=null gives an NPE
> Unboxing in createClient (minor).
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)