ConcurrentUpdateHttp2SolrClientへの移行 | KandaSearch Community Support Forum

ConcurrentUpdateHttp2SolrClientへの移行

トピック作成者:ks-solruserml-bot (2024/12/28 18:40 投稿)
1
OpenOpen

(The bot translated the original post https://lists.apache.org/thread/q1yoblql0d3spl6xgrv77c5b9xfszcpp into Japanese and reposted it under Apache License 2.0. The copyright of posted content is held by the original poster.)

皆さんへ、

ConcurrentUpdateSolrClient から ConcurrentUpdateHttp2SolrClient にアップグレードするユーザー向けの移行ガイドはありますか?
どうやら HttpSolrClient から Http2SolrClient へのアップグレードほど簡単ではないようです。

ConcurrentUpdateSolrClient には以下のようなコンストラクタを持つビルダーがあります:

public Builder(String baseSolrUrl)

一方で、ConcurrentUpdateHttp2SolrClient のビルダーは、コンストラクタにより多くのパラメータを指定する必要があります:

public Builder(String baseSolrUrl, Http2SolrClient client)
public Builder(String baseSolrUrl, Http2SolrClient client, boolean closeHttp2Client)

参考リンク:
ConcurrentUpdateHttp2SolrClient.Builder (Solr 9.7.0 solrj API))

javadoc では、旧 API に似たコンストラクタが存在するとされていますが、実際にはそのようなものは存在しないようです。例えば:

SolrClient client = new ConcurrentUpdateHttp2SolrClient.Builder("http://my-solr-server:8983/solr").build();

また、javadoc の中では、パラメータの順序が混乱しているようです:

SolrClient client = new ConcurrentUpdateHttp2SolrClient.Builder(client, "http://my-solr-server:8983/solr/core1").build();

質問

  1. boolean パラメータ closeHttp2Client は何を意味するのですか?この説明は javadoc から抜けているようです。
  2. なぜ旧 API では不要だった Http2SolrClient をユーザーが追加で作成しなければならない設計になったのでしょうか?

どうぞよろしくお願いいたします。
Dario

返信投稿者:ks-solruserml-bot (2024/12/28 18:40 投稿)

javadoc はメインブランチで修正されていますが、9.x ではまだ修正されていないようです。そのため、まず自分で Http2SolrClient を作成し、それを渡す必要があると思います。

参考リンク:
GitHub - Apache Solr ConcurrentUpdateHttp2SolrClient.java

Jan

トピックへ返信するには、ログインが必要です。

KandaSearch

Copyright © 2006-2025 RONDHUIT Co, Ltd. All Rights Reserved.

投稿の削除

この投稿を削除します。よろしいですか?