Solrj 9.7.0 の RAMDirectoryFactory

(The bot translated the original post https://lists.apache.org/thread/z0k8rwlmrmkk7k3z3v41o0409wx492xm into Japanese and reposted it under Apache License 2.0. The copyright of posted content is held by the original poster.)
皆さんへ、
私はApache Solrを集中的に利用するアプリケーションを開発しています。このアプリケーションでは、図書館のカタログレコードを検索可能にする機能を含んでいます。そのアプリケーションのインデックス作成機能をテストするために、JUnitテストをいくつか書きました。それらのテストでは、EmbeddedSolrServer
を使用しています。これらのテストの意図は、インメモリインデックス(core.RAMDirectoryFactory
を使用)を作成することです。
最近、Solrのアップデートにより、これらのテストで呼び出すAPIメソッドがいくつか変更されましたが、これまでは問題を解決することができました。ただし、現在は解決できないエラーメッセージに直面しており、アドバイスを求めています。
使用しているsolrconfig.xml
は以下の通りです:
<?xml version="1.0" encoding="UTF-8" ?>
<config>
<luceneMatchVersion>9.11</luceneMatchVersion>
<indexConfig>
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
<lockType>${solr.lock.type:single}</lockType>
</indexConfig>
<dataDir>${solr.data.dir:data}</dataDir>
<directoryFactory class="org.apache.solr.core.RAMDirectoryFactory" />
<schemaFactory class="ClassicIndexSchemaFactory"/>
<updateHandler class="solr.DirectUpdateHandler2">
<updateLog>
<str name="dir">${solr.data.dir:}</str>
</updateLog>
</updateHandler>
<requestDispatcher>
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="-1" />
</requestDispatcher>
<requestHandler name="/select" class="solr.SearchHandler"/>
<initParams path="/select">
<lst name="defaults">
<str name="df">name</str>
</lst>
</initParams>
</config>
以下のエラーメッセージが表示されます:
org.apache.solr.common.SolrException: Unable to create core [<core name>]
...
caused by org.apache.solr.common.SolrException: RAMDirectory can only
be used with the 'single' lock factory type.
次のような変更を加えた場合でも、同じエラーが発生します:
<directoryFactory class="org.apache.solr.core.RAMDirectoryFactory">
<str name="lockType">single</str>
</directoryFactory>
または:
<directoryFactory class="org.apache.solr.core.RAMDirectoryFactory">
<str name="rawLockType">single</str>
</directoryFactory>
何かアドバイスがあれば、あるいは同様のユースケースをご存じで参考にできる事例があれば教えていただけないでしょうか?
どうぞよろしくお願いいたします。
Péter
トピックへ返信するには、ログインが必要です。