[ 
https://issues.apache.org/jira/browse/CAMEL-27639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-27639:
--------------------------------
    Fix Version/s: 4.25.0
                       (was: 4.24.0)

> camel-solr: half-set credentials ignored, missing labels and defaults, 
> category, syntax
> ---------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27639
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27639
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-solr
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-solr for CAMEL-23832 
> (PR https://github.com/apache/camel/pull/30974).
> These are separate problems of the component; the descriptions PR only 
> documents the current behavior.
> h4. 1. A username without a password (or the other way round) is ignored 
> without a warning
> {{SolrEndpoint.createSolrClient()}} sets basic authentication only when both 
> {{username}} and {{password}} are not empty. When only one of them is set, 
> the client sends no credentials and logs nothing. The user sees an HTTP 401 
> from Solr and cannot tell from the Camel side that the option was dropped.
> Proposed change: fail at endpoint start (or at least log a WARN) when only 
> one of the two options is set.
> h4. 2. The endpoint options have no producer label
> All options of {{SolrConfiguration}} use {{@UriParam}} or {{@UriPath}} 
> without a {{label}}, so the metadata shows an empty label for every option, 
> although the endpoint is {{producerOnly = true}}. Tooling that groups options 
> by label cannot place them.
> Proposed change: add {{label = "producer"}} (and keep {{advanced}} / 
> {{security}} where set, e.g. {{producer,security}}).
> h4. 3. The endpoint requestTimeout and connectionTimeout show no default value
> {{SolrConfiguration.requestTimeout}} and {{connectionTimeout}} are {{Long}} 
> fields without {{defaultValue}}. {{SolrComponent.createEndpoint()}} always 
> copies the component values into the configuration, so the effective defaults 
> are 600000 and 60000 ms ({{SolrConstants.DEFAULT_REQUEST_TIMEOUT}} and 
> {{DEFAULT_CONNECT_TIMEOUT}}). The docs show no default for the endpoint 
> options.
> Proposed change: add the {{defaultValue}} to the two endpoint options, or 
> document them as taken from the component.
> h4. 4. The component port shows no default value
> {{SolrComponent.port}} is an {{int}} without {{defaultValue}}, so it is 0. 
> {{SolrConfiguration.configure()}} then uses 8983 for an endpoint without a 
> port. The docs show no default for the component option.
> Proposed change: add {{defaultValue = "8983"}} or document that 0 means 8983.
> h4. 5. The category MONITORING does not fit
> {{@UriEndpoint}} of {{SolrEndpoint}} has {{category = { Category.SEARCH, 
> Category.MONITORING }}}. The component indexes and searches documents; it has 
> no monitoring feature (PING only checks that Solr answers).
> Proposed change: keep only {{Category.SEARCH}}.
> h4. 6. The URI syntax in the metadata and on the doc page differ
> The metadata syntax is {{solr:host:port/basePath}}, while the "URI format" 
> section of {{solr-component.adoc}} shows {{solr://host[:port]?[options]}}, 
> without the base path. {{SolrConfiguration.configure()}} also reads a path 
> {{/solr/<collection>/<requestHandler>}}, which neither shows.
> Proposed change: align the doc page with the syntax and describe the 
> {{/solr/<collection>/<requestHandler>}} form.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to