search api for ehcache
I have just checked the Terracotta EHCache and found the open source version has not supporting the search queries on th开发者_Python百科e cache. I just tried with small application but it is clearly throwing exception like it is supporting only on enterprise version. Is there any open source alternative available to search on Ehcache?
Search is only supported as part of the OS product with unclustered caches. To use Search with Terracotta clustered caches, you do require the EE version of the product.
If you use EhCache standalone (no cluster) and not using BigMemory Terracotta feature, then you don't need Terracotta and search API will work. Perhaps you have terracotta jars on your classpath that interfere....make sure you don't have terracota jars. Also in your ehcache.xml make sure you don't enable terracotta by providing <terracotta>
xml tag.e.g.
<cache name="MySearcheablePOJO" eternal="true">
<searchable>
<searchAttribute name="attr1" />
<searchAttribute name="attr2" />
<searchAttribute name="attr3" />
</searchable>
<!--<terracotta> NOTICE ITS COMMENTED -->
</cache>
regarding any other alternative for cache with search ... perhaps you can try using Apache SOLR which is based on Lucene indexing engine. Otherwise not much choice out there...
精彩评论