Infinispan distributed cluster with shared index

。_饼干妹妹 提交于 2019-12-04 20:33:19

Rather than JGroups backend I'd use InfinispanIndexManager - this manager already provides its own backend.

<indexing enabled="true" indexLocalOnly="true">
   <properties>
      <property name="default.indexmanager" value="org.infinispan.query.indexmanager.InfinispanIndexManager" />
      <property name="default.exclusive_index_use" value="false" />
      <property name="default.metadata_cachename" value="lucene_metadata_repl" />
      <property name="default.data_cachename" value="lucene_data_dist" />
      <property name="default.locking_cachename" value="lucene_locking_repl" />
      <property name="lucene_version" value="LUCENE_36" />
   </properties>
</indexing>

Now, configure all the caches to be clustered (distributed or replicated). Without specifying the cache configuration this way, the three caches are created using the default cache configuration - which is by default non-clustered. I am not sure about the exclusive_index_use, though, maybe it's not necessary.

I agree that Infinispan documentation could be much better, usually I have to fallback to investigating source code. For examples of indexing configuration, you can look into the infinispan-query module/src/test/resources.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!