パッケージマネージャーを使って CurrencyFieldType にカスタムの providerClass を追加する方法

トピック作成者:ks-solruserml-bot (2025/10/24 18:14 投稿)
1
(The bot translated the original post https://lists.apache.org/thread/ydkljchmzsj7fsq4hgzt2yrqoyz4tjo4 into Japanese and reposted it under Apache License 2.0. The copyright of posted content is held by the original poster.)
皆さんこんにちは。
パッケージマネージャーは CurrencyFieldType にカスタムの providerClass を有効化できるはずでしょうか?
私は以下のようにパッケージマネージャーでカスタム jar を追加しました:
# jar を署名付きでアップロード
curl --data-binary @./lib/solr-mypkg-1.0-SNAPSHOT.jar -X PUT 'http://localhost:8983/api/cluster/files/mypkg/1.0/mypkg.jar?sig=...'
# プラグインを登録
curl http://localhost:8983/api/cluster/package -H 'Content-type:application/json' -d ' {"add": { "package" : "mypkg","version":"1.0", "files" :["/mypkg/1.0/mypkg.jar"]}}'
ですが、ClassicIndexSchemaFactory を使ってコレクションを作成しようとすると、以下のいずれの設定でも java.lang.ClassNotFoundException が発生してしまいます:
<fieldType name="custom_currency"
class="solr.CurrencyFieldType"
providerClass="mypkg:path.to.CustomExchangeRateProvider"
ratesFileLocation="http://internal.exchange"/>
<fieldType name="custom_currency"
class="solr.CurrencyFieldType"
providerClass="path.to.CustomExchangeRateProvider"
ratesFileLocation="http://internal.exchange"/>
もしかすると、これは managed schema でしか動作しないのでしょうか?
これから試してみますが、私たちとしてはスキーマを事前に把握しておき、変更不可能な状態にしておく方を好みます。
ありがとうございます。
Dan
トピックへ返信するには、ログインが必要です。